Repository navigation
Blink: port 12 Squiz sniffs and Generic ScopeIndent - #407
Merged
Merged
Conversation
… and MultiLineFunctionDeclaration sniffs
TomasVotruba
force-pushed
the
blink-phpcs-squiz
branch
from
November 19, 2026 22:50
81de07a to
ef3cc10
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports 12 more Squiz sniffs and Generic ScopeIndent to blink. PHP_CodeSniffer coverage goes from 101/114 to 114/114 - every fixable PHP_CodeSniffer sniff is now in blink. Rebased on #406.
Each matches ECS output byte for byte on the upstream PHPCS 4.0.4 test inputs (
TestPhpcsUpstreamFixtures), and was also compared against ECS (one file per process) on vendor files and tab-indented copies.levelMap()) andstartOfStatementIgnoringtophpcs_scope.go. ECS never sets PHPCS'sfixer->enabled, so the sniff's nested re-indent block is inert under ECS and the port mirrors that.Shared changes:
slevomat.go-yield ... fromwith a comment or newline inside is one token in PHP 8.3+, PHPCS splits it intoyield, the tokens between andfrom;slvSplitnow does the same.priorities.go- slevomat UselessSemicolon raised from 0 to 1 so it removesif (...) {};before Squiz ControlStructureSpacing looks at the line (TestAllFixersIdempotent), like NoEmptyStatementFixer.pear_function_comment.go/pear_function_declaration.go- split into reusable pieces for the Squiz subclasses; PEAR behavior unchanged.phpcs-not-ported.txtis now empty.