-
Notifications
You must be signed in to change notification settings - Fork 1
Sniff/control signature #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.x
Are you sure you want to change the base?
Conversation
Added a TokenCollection to have typehinting and other DX for interacting with Tokens
| <?php declare(strict_types=1); | ||
|
|
||
| if (false) { | ||
| } elseif (true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be ok
| default: | ||
| break;} | ||
|
|
||
| if (false) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just BAN the ":" syntax?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the "old" syntax is supported to allow codestyle of template file.
But I don't think we actually use it.
And for eveything new we use twig also
| return; | ||
| } | ||
|
|
||
| $isAlternative = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused?
| $closer = $tokens->parenthesisCloser($stackPtr); | ||
| $found = 0; | ||
| if ($tokens->code($closer + 1) === T_WHITESPACE) { | ||
| if (strpos($tokens->content($closer + 1), $phpcsFile->eolChar) !== false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace with str_contains
1:1 with the original, minus some dead code.