File tree 1 file changed +2
-4
lines changed
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)
305
305
return false ;
306
306
}
307
307
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 ());
312
309
$ function = $ this ->getNode ($ parent ->getParent ());
313
310
$ functionParent = $ this ->getNode ($ function ->getParent ());
314
311
$ functionName = $ function ->getImage ();
@@ -325,6 +322,7 @@ protected function isPassedByReference($variable)
325
322
}
326
323
327
324
$ parameters = $ reflectionFunction ->getParameters ();
325
+ $ argumentPosition = min ($ argumentPosition , count ($ parameters ) - 1 );
328
326
329
327
return isset ($ parameters [$ argumentPosition ]) && $ parameters [$ argumentPosition ]->isPassedByReference ();
330
328
}
You can’t perform that action at this time.
0 commit comments