Skip to content

Commit ba8d9b3

Browse files
committed
docs: fix PHPDoc types
1 parent a3097ab commit ba8d9b3

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

system/BaseModel.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,9 +1659,9 @@ public function asObject(string $class = 'object')
16591659
* This method uses objectToRawArray() internally and does conversion
16601660
* to string on all Time instances
16611661
*
1662-
* @param object|null $object Object
1663-
* @param bool $onlyChanged Only Changed Property
1664-
* @param bool $recursive If true, inner entities will be cast as array as well
1662+
* @param object $object Object
1663+
* @param bool $onlyChanged Only Changed Property
1664+
* @param bool $recursive If true, inner entities will be cast as array as well
16651665
*
16661666
* @return array Array
16671667
*
@@ -1691,16 +1691,17 @@ protected function objectToArray($object, bool $onlyChanged = true, bool $recurs
16911691
* Takes a class and returns an array of its public and protected
16921692
* properties as an array with raw values.
16931693
*
1694-
* @param object|null $object Object
1695-
* @param bool $onlyChanged Only Changed Property
1696-
* @param bool $recursive If true, inner entities will be casted as array as well
1694+
* @param object $object Object
1695+
* @param bool $onlyChanged Only Changed Property
1696+
* @param bool $recursive If true, inner entities will be casted as array as well
16971697
*
1698-
* @return array|null Array
1698+
* @return array<string, mixed>
16991699
*
17001700
* @throws ReflectionException
17011701
*/
17021702
protected function objectToRawArray($object, bool $onlyChanged = true, bool $recursive = false): array
17031703
{
1704+
// Entity::toRawArray() returns array.
17041705
if (method_exists($object, 'toRawArray')) {
17051706
$properties = $object->toRawArray($onlyChanged, $recursive);
17061707
} else {

system/Model.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,10 +788,10 @@ public function update($id = null, $data = null): bool
788788
* Takes a class and returns an array of its public and protected
789789
* properties as an array with raw values.
790790
*
791-
* @param object|null $object Object
792-
* @param bool $recursive If true, inner entities will be cast as array as well
791+
* @param object $object Object
792+
* @param bool $recursive If true, inner entities will be cast as array as well
793793
*
794-
* @return array|null Array
794+
* @return array<string, mixed>
795795
*
796796
* @throws ReflectionException
797797
*/

0 commit comments

Comments
 (0)