You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's a no-op, since the return value of the array_map isn't used. I think that the array_map should be removed, replaced with array_walk (probably pointless unless it would throw), or (probably) be changed to:
This is correct: that filter is not supposed to use the returned value, but just to check that the input is somewhat used.
Should've been an array_walk(), but closing here, as in #57 I documented it briefly, and we can further improve it when moving to aggressive vimeo/psalm analysis.
https://github.com/zendframework/zend-code/blob/master/src/Generator/ClassGenerator.php#L476-L482 has the following snippet
That's a no-op, since the return value of the array_map isn't used. I think that the array_map should be removed, replaced with array_walk (probably pointless unless it would throw), or (probably) be changed to:
The latter seems likely given the rest of the changes in zendframework/zend-code@ec09875
This was detected via static analysis, I'm not sure of the impact of fixing this.
http://php.net/array_map
Originally posted by @TysonAndre at zendframework/zend-code#165
The text was updated successfully, but these errors were encountered: