File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/Rules/TooWideTypehints Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -86,22 +86,22 @@ public function checkFunction(
8686 return [];
8787 }
8888
89- $ functionReturnTypes = [];
89+ $ returnTypes = [];
9090 foreach ($ returnStatements as $ returnStatement ) {
9191 $ returnNode = $ returnStatement ->getReturnNode ();
9292 if ($ returnNode ->expr === null ) {
93- $ functionReturnTypes [] = new VoidType ();
93+ $ returnTypes [] = new VoidType ();
9494 continue ;
9595 }
9696
97- $ functionReturnTypes [] = $ returnStatement ->getScope ()->getType ($ returnNode ->expr );
97+ $ returnTypes [] = $ returnStatement ->getScope ()->getType ($ returnNode ->expr );
9898 }
9999
100100 if (!$ statementResult ->isAlwaysTerminating ()) {
101- $ functionReturnTypes [] = new VoidType ();
101+ $ returnTypes [] = new VoidType ();
102102 }
103103
104- $ returnType = TypeCombinator::union (...$ functionReturnTypes );
104+ $ returnType = TypeCombinator::union (...$ returnTypes );
105105
106106 // Do not require to have @return null/true/false in descendant classes
107107 if (
You can’t perform that action at this time.
0 commit comments