@@ -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 {
0 commit comments