@@ -1221,7 +1221,6 @@ private function shouldKeepList(ArrayDimFetch $arrayDimFetch, Scope $scope, Type
12211221 && $ arrayDimFetch ->dim ->right instanceof Node \Scalar \Int_
12221222 && $ arrayDimFetch ->dim ->left instanceof Expr \FuncCall
12231223 && $ arrayDimFetch ->dim ->left ->name instanceof Name
1224- && !$ arrayDimFetch ->dim ->left ->isFirstClassCallable ()
12251224 && in_array ($ arrayDimFetch ->dim ->left ->name ->toLowerString (), ['count ' , 'sizeof ' ], true )
12261225 && count ($ arrayDimFetch ->dim ->left ->getArgs ()) === 1 // could support COUNT_RECURSIVE, COUNT_NORMAL
12271226 && $ this ->isSameVariable ($ arrayDimFetch ->var , $ arrayDimFetch ->dim ->left ->getArgs ()[0 ]->value )
@@ -1232,7 +1231,6 @@ private function shouldKeepList(ArrayDimFetch $arrayDimFetch, Scope $scope, Type
12321231 } elseif ( // keep list for $list[array_key_last($list)] and $list[array_key_first($list)] assignments
12331232 $ arrayDimFetch ->dim instanceof Expr \FuncCall
12341233 && $ arrayDimFetch ->dim ->name instanceof Name
1235- && !$ arrayDimFetch ->dim ->isFirstClassCallable ()
12361234 && in_array ($ arrayDimFetch ->dim ->name ->toLowerString (), ['array_key_last ' , 'array_key_first ' ], true )
12371235 && count ($ arrayDimFetch ->dim ->getArgs ()) >= 1
12381236 && $ this ->isSameVariable ($ arrayDimFetch ->var , $ arrayDimFetch ->dim ->getArgs ()[0 ]->value )
@@ -1241,7 +1239,6 @@ private function shouldKeepList(ArrayDimFetch $arrayDimFetch, Scope $scope, Type
12411239 } elseif ( // keep list for $list[array_search($needle, $list)] assignments
12421240 $ arrayDimFetch ->dim instanceof Expr \FuncCall
12431241 && $ arrayDimFetch ->dim ->name instanceof Name
1244- && !$ arrayDimFetch ->dim ->isFirstClassCallable ()
12451242 && $ arrayDimFetch ->dim ->name ->toLowerString () === 'array_search '
12461243 && count ($ arrayDimFetch ->dim ->getArgs ()) >= 1
12471244 && $ this ->isSameVariable ($ arrayDimFetch ->var , $ arrayDimFetch ->dim ->getArgs ()[1 ]->value )
0 commit comments