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
The docblock here is intentionally incorrect, which seems to be a contributing factor to this issue. Although the documentation indicates that this method should only accept an array, in reality it can accept anything. If, for example, null is passed instead of an array, the method will return null. Rector should not add the : array return type declaration in this case.
The text was updated successfully, but these errors were encountered:
Bug Report
Minimal PHP Code Causing Issue
See https://getrector.com/demo/630b6283-e769-46d0-b928-542ad1bae349
Responsible rules
ReturnTypeFromStrictNewArrayRector
Expected Behavior
The docblock here is intentionally incorrect, which seems to be a contributing factor to this issue. Although the documentation indicates that this method should only accept an
array
, in reality it can accept anything. If, for example,null
is passed instead of anarray
, the method will returnnull
. Rector should not add the: array
return type declaration in this case.The text was updated successfully, but these errors were encountered: