Skip to content

Commit 5ab8dcb

Browse files
authored
Merge pull request #2 from PHPCompatibility/feature/prevent-false-positives-on-polyfill-code
Ruleset: prevent false positives on Symfony polyfill code
2 parents 83d18e6 + 95dc9a6 commit 5ab8dcb

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

PHPCompatibilitySymfonyPolyfillPHP55/ruleset.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@
1313
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.json_last_error_msgFound"/>
1414
</rule>
1515

16+
<!-- Prevent false positives being thrown when run over the code of polyfill-php55 itself. -->
17+
<rule ref="PHPCompatibility.Constants.NewConstants.json_error_utf8Found">
18+
<exclude-pattern>/polyfill-php55/Php55\.php$</exclude-pattern>
19+
</rule>
20+
1621
</ruleset>

PHPCompatibilitySymfonyPolyfillPHP72/ruleset.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@
1515
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.mb_scrubFound"/>
1616
</rule>
1717

18+
<!-- Prevent false positives being thrown when run over the code of polyfill-php55 itself. -->
19+
<rule ref="PHPCompatibility.Constants.NewConstants.debug_backtrace_ignore_argsFound">
20+
<exclude-pattern>/polyfill-php72/Php72\.php$</exclude-pattern>
21+
</rule>
22+
1823
</ruleset>

0 commit comments

Comments
 (0)