Skip to content

Commit

Permalink
Merge pull request #8 from gabesullice/allow-assert-expressions
Browse files Browse the repository at this point in the history
Exclude the Security.BadFunctions.Asserts sniff.
  • Loading branch information
danepowell committed Feb 4, 2020
2 parents 1c5ba0c + 9612acc commit 89a0747
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Standards/AcquiaDrupalStrict/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
<rule ref="DrupalPractice"/>

<!-- PHPCS_SecurityAudit sniffs -->
<rule ref="Security.Drupal8"/>
<rule ref="Security.Drupal8">
<!-- Security.BadFunctions.Asserts forces assertions to use string expressions. String expressions have been deprecated since PHP 7.2.0 -->
<exclude name="Security.BadFunctions.Asserts"/>
</rule>

<!-- Acquia PHP sniffs -->
<rule ref="AcquiaPHP"/>
Expand Down
5 changes: 4 additions & 1 deletion src/Standards/AcquiaDrupalTransitional/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
<rule ref="DrupalPractice.Commenting.ExpectedException"/>

<!-- PHPCS_SecurityAudit sniffs -->
<rule ref="Security.Drupal8"/>
<rule ref="Security.Drupal8">
<!-- Security.BadFunctions.Asserts forces assertions to use string expressions. String expressions have been deprecated since PHP 7.2.0 -->
<exclude name="Security.BadFunctions.Asserts"/>
</rule>

<!-- Acquia PHP sniffs -->
<rule ref="AcquiaPHP"/>
Expand Down

0 comments on commit 89a0747

Please sign in to comment.