File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -305,10 +305,7 @@ protected function isPassedByReference($variable)
305305 return false ;
306306 }
307307
308- $ argumentPosition = min (
309- array_search ($ this ->getNode ($ variable ), $ parent ->getChildren ()),
310- count ($ parameters ) - 1
311- );
308+ $ argumentPosition = array_search ($ this ->getNode ($ variable ), $ parent ->getChildren ());
312309 $ function = $ this ->getNode ($ parent ->getParent ());
313310 $ functionParent = $ this ->getNode ($ function ->getParent ());
314311 $ functionName = $ function ->getImage ();
@@ -325,6 +322,7 @@ protected function isPassedByReference($variable)
325322 }
326323
327324 $ parameters = $ reflectionFunction ->getParameters ();
325+ $ argumentPosition = min ($ argumentPosition , count ($ parameters ) - 1 );
328326
329327 return isset ($ parameters [$ argumentPosition ]) && $ parameters [$ argumentPosition ]->isPassedByReference ();
330328 }
You can’t perform that action at this time.
0 commit comments