@@ -41,12 +41,11 @@ class Caster
4141 * Casts objects to arrays and adds the dynamic property prefix.
4242 *
4343 * @param object $obj The object to cast
44- * @param string $class The class of the object
4544 * @param bool $hasDebugInfo Whether the __debugInfo method exists on $obj or not
4645 *
4746 * @return array The array-cast of the object, with prefixed dynamic properties
4847 */
49- public static function castObject ($ obj , $ class , $ hasDebugInfo = false ): array
48+ public static function castObject ($ obj , string $ class , bool $ hasDebugInfo = false ): array
5049 {
5150 $ a = $ obj instanceof \Closure ? [] : (array ) $ obj ;
5251
@@ -110,7 +109,7 @@ public static function castObject($obj, $class, $hasDebugInfo = false): array
110109 *
111110 * @return array The filtered array
112111 */
113- public static function filter (array $ a , $ filter , array $ listedProperties = [], &$ count = 0 ): array
112+ public static function filter (array $ a , int $ filter , array $ listedProperties = [], ? int &$ count = 0 ): array
114113 {
115114 $ count = 0 ;
116115
@@ -151,7 +150,7 @@ public static function filter(array $a, $filter, array $listedProperties = [], &
151150 return $ a ;
152151 }
153152
154- public static function castPhpIncompleteClass (\__PHP_Incomplete_Class $ c , array $ a , Stub $ stub , $ isNested )
153+ public static function castPhpIncompleteClass (\__PHP_Incomplete_Class $ c , array $ a , Stub $ stub , bool $ isNested ): array
155154 {
156155 if (isset ($ a ['__PHP_Incomplete_Class_Name ' ])) {
157156 $ stub ->class .= '( ' .$ a ['__PHP_Incomplete_Class_Name ' ].') ' ;
0 commit comments