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 problem is that PHP tokenizes the string default as T_DEFAULT and then PHPCS sees the colon for the return type and tries to match it with T_DEFAULT, as it does in case statements.
The fix is to change T_DEFAULT to T_STRING earlier (it was done on the second pass, now on the first pass) to stop any matching from taking place.
@gsherwood since this is a bug in 2.x version, are you planning to update 2.x as well ? I noticed that the update is only on master right now. Thanks for the fast response btw 👍
@pawelbaranski The master branch is the 2.x version. The fix was also merged into the 3.0 branch, so it will be released in both the next 2.x and 3.x versions.
I get WARNING
Possible parse error: non-abstract method defined as abstract
My test method is:
I use squizlabs/php_codesniffer is 2.7.1
The text was updated successfully, but these errors were encountered: