Skip to content

Commit

Permalink
Merge pull request #223 from Yoast/feature/work-round-phpcs-bug
Browse files Browse the repository at this point in the history
PHPCS: fix bug in ruleset
  • Loading branch information
jrfnl authored Jan 5, 2025
2 parents 69025f6 + f3d1f36 commit dacfc81
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@
<exclude name="WordPress.WP"/>
<exclude name="Yoast.Yoast.JsonEncodeAlternative"/>
<exclude name="Yoast.NamingConventions.ObjectNameDepth.MaxExceeded"/>
<exclude name="WordPressVIPMinimum"/>
<exclude name="WordPressVIPMinimum.Classes.DeclarationCompatibility"/>
<exclude name="WordPressVIPMinimum.Hooks.AlwaysReturnInFilter"/>
<exclude name="WordPressVIPMinimum.Security.EscapingVoidReturnFunctions"/>
<exclude name="WordPressVIPMinimum.Security.ProperEscapingFunction"/>

<!-- Exclude select "modern PHP" sniffs, which conflict with the minimum supported PHP version of this package. -->
<exclude name="SlevomatCodingStandard.Classes.ModernClassNameReference"/><!-- PHP 5.5+ -->
Expand Down
2 changes: 2 additions & 0 deletions src/TestListeners/TestListenerSnakeCaseMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

/**
* Renamed snake_case TestListener method collection used by the TestListenerDefaultImplementation traits.
*
* @phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -- This is intentional as these are template methods.
*/
trait TestListenerSnakeCaseMethods {

Expand Down
2 changes: 2 additions & 0 deletions tests/TestListeners/Fixtures/TestListenerImplementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
/**
* TestListener implementation for testing the TestListener cross-version
* TestListenerDefaultImplementation trait.
*
* @phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -- This is intentional. These params can be used, but don't have to be.
*/
class TestListenerImplementation implements TestListener {

Expand Down

0 comments on commit dacfc81

Please sign in to comment.