File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
rules/TypeDeclaration/NodeAnalyzer Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,11 @@ public function resolveStrictTypesFromCalls(array $calls): array
4040 $ staticTypesByArgumentPosition = [];
4141
4242 foreach ($ calls as $ call ) {
43- foreach ($ call ->args as $ position => $ arg ) {
43+ if ($ call ->isFirstClassCallable ()) {
44+ return [];
45+ }
46+
47+ foreach ($ call ->getArgs () as $ position => $ arg ) {
4448 if ($ this ->shouldSkipArg ($ arg )) {
4549 return [];
4650 }
@@ -200,15 +204,11 @@ private function normalizeType(Type $argValueType): MixedType|ObjectType|Type
200204 }
201205
202206 /**
203- * There is first class callable usage, or argument unpack, or named expr
207+ * There is argument unpack, or named expr
204208 * simply returns array marks as unknown as can be anything and in any position
205209 */
206- private function shouldSkipArg (Arg | VariadicPlaceholder $ arg ): bool
210+ private function shouldSkipArg (Arg $ arg ): bool
207211 {
208- if ($ arg instanceof VariadicPlaceholder) {
209- return true ;
210- }
211-
212212 if ($ arg ->unpack ) {
213213 return true ;
214214 }
You can’t perform that action at this time.
0 commit comments