Skip to content

Commit

Permalink
Add ReturnTypeWillChange attribute to Entity (#5028)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan authored Aug 27, 2021
1 parent 4272b8e commit 82d39de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion system/Entity/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use CodeIgniter\I18n\Time;
use Exception;
use JsonSerializable;
use ReturnTypeWillChange;

/**
* Entity encapsulation, for use with CodeIgniter\Model
Expand Down Expand Up @@ -406,8 +407,9 @@ private function castAsJson($value, bool $asArray = false)
/**
* Support for json_encode()
*
* @return array|mixed
* @return array
*/
#[ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toArray();
Expand Down

0 comments on commit 82d39de

Please sign in to comment.