Skip to content

Commit

Permalink
PHPCS: add the Squiz.PHP.NonExecutableCode sniff to the ruleset
Browse files Browse the repository at this point in the history
... which is used for PHPCS itself.
  • Loading branch information
jrfnl committed Oct 29, 2023
1 parent 8b407f7 commit 91cd66a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@
<type>error</type>
</rule>

<!-- Do not allow unreachable code. -->
<rule ref="Squiz.PHP.NonExecutableCode">
<type>error</type>
</rule>

<!-- The testing bootstrap file uses string concats to stop IDEs seeing the class aliases -->
<rule ref="Generic.Strings.UnnecessaryStringConcat">
<exclude-pattern>tests/bootstrap\.php</exclude-pattern>
Expand Down

0 comments on commit 91cd66a

Please sign in to comment.