Add a code sniffer config for files that need to remain compatible with PHP 5.3.

pull/674/head
John Blackbourn 2 years ago
parent 03000fff47
commit 92c83a7162

@ -49,6 +49,7 @@
"@test:acceptance"
],
"test:cs": [
"phpcs -nps --colors --report-code --report-width=80 --cache=tests/cache/phpcs --basepath='./' --standard=phpcs53.xml",
"phpcs -nps --colors --report-code --report-width=80 --cache=tests/cache/phpcs --basepath='./' ."
],
"test:phpstan": [

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<ruleset name="Query Monitor PHP 5.3 compatibility">
<config name="testVersion" value="5.3-"/>
<!-- These files must remain compatible with PHP 5.3 to prevent an unwanted fatal error -->
<file>./classes/PHP.php</file>
<file>./query-monitor.php</file>
<file>./wp-content/db.php</file>
<rule ref="PHPCompatibilityWP"/>
</ruleset>
Loading…
Cancel
Save