Skip to content

Commit 6f12686

Browse files
authored
Support nullable return (#60)
1 parent fc622b0 commit 6f12686

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Fractal.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ public function toJson($options = 0)
362362
/**
363363
* Perform the transformation to array.
364364
*
365-
* @return array
365+
* @return array|null
366366
*/
367367
public function toArray()
368368
{
@@ -455,10 +455,10 @@ public function getResourceName()
455455
/**
456456
* Convert the object into something JSON serializable.
457457
*
458-
* @return array
458+
* @return array|null
459459
*/
460460
#[\ReturnTypeWillChange]
461-
public function jsonSerialize(): array
461+
public function jsonSerialize(): ?array
462462
{
463463
return $this->toArray();
464464
}

0 commit comments

Comments
 (0)