File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 14
14
use function gettype ;
15
15
use function is_array ;
16
16
use function is_callable ;
17
+ use function is_object ;
17
18
use function is_string ;
18
19
use function preg_match ;
19
20
use function spl_object_hash ;
@@ -271,7 +272,13 @@ private function getNativeId(callable $callback): string
271
272
}
272
273
273
274
if (is_array ($ callback )) {
274
- return get_class ($ callback [0 ]) . ':: ' . $ callback [1 ];
275
+ if (isset ($ callback [0 ]) && is_object ($ callback [0 ])) {
276
+ return get_class ($ callback [0 ]) . ':: ' . $ callback [1 ];
277
+ }
278
+
279
+ if (isset ($ callback [0 ]) && is_string ($ callback [0 ])) {
280
+ return $ callback [0 ] . ':: ' . $ callback [1 ];
281
+ }
275
282
}
276
283
277
284
return spl_object_hash (Closure::fromCallable ($ callback ));
Original file line number Diff line number Diff line change 42
42
"dealerdirect/phpcodesniffer-composer-installer" : " ^1.0" ,
43
43
"phpcompatibility/php-compatibility" : " ^9.3" ,
44
44
"phpstan/extension-installer" : " ^1.4" ,
45
- "phpstan/phpstan" : " ^1.12 " ,
46
- "phpstan/phpstan-phpunit" : " ^1.4 " ,
47
- "phpstan/phpstan-strict-rules" : " ^1.6 " ,
45
+ "phpstan/phpstan" : " ^2.0 " ,
46
+ "phpstan/phpstan-phpunit" : " ^2.0 " ,
47
+ "phpstan/phpstan-strict-rules" : " ^2.0 " ,
48
48
"phpunit/phpunit" : " ^9.6" ,
49
49
"roots/wordpress" : " ^6.6" ,
50
50
"symfony/var-dumper" : " ^5.4" ,
51
51
"syntatis/coding-standard" : " ^1.4" ,
52
- "szepeviktor/phpstan-wordpress" : " ^1.3 " ,
52
+ "szepeviktor/phpstan-wordpress" : " ^2.0 " ,
53
53
"wp-phpunit/wp-phpunit" : " ^6.6" ,
54
54
"yoast/phpunit-polyfills" : " ^3.0"
55
55
},
You can’t perform that action at this time.
0 commit comments