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
{{ message }}
Repository navigation
PSR2.Namespaces.UseDeclaration.SpaceAfterUse should also check for space after use const/use function #2960
Because of the reasons detailed in #2961 (comment), I believe this issue should be closed. const\Import\SomeConst and function\Import\SomeFunction are seen by PHP and PHPCS as a single T_NAME_QUALIFIED token, so there is no easy way for PHPCS to trigger PSR2.Namespaces.UseDeclaration when it finds the code above. Not to mention that the code above is valid, and adding the space would change its behavior.
Activity
rodrigoprimo commentedon Mar 4, 2026
Because of the reasons detailed in #2961 (comment), I believe this issue should be closed.
const\Import\SomeConstandfunction\Import\SomeFunctionare seen by PHP and PHPCS as a singleT_NAME_QUALIFIEDtoken, so there is no easy way for PHPCS to triggerPSR2.Namespaces.UseDeclarationwhen it finds the code above. Not to mention that the code above is valid, and adding the space would change its behavior.jrfnl commentedon Mar 4, 2026
* since PHP 8.0.