Ignore side-effect rule in phpcs for Decoder

This commit is contained in:
Gregory Oschwald
2018-11-16 11:40:28 -08:00
parent d9144787ec
commit 1596325613
3 changed files with 10 additions and 1 deletions

8
.phpcs-ruleset.xml Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<ruleset name="APSR2">
<description>Adjusted PSR2</description>
<rule ref="PSR2" />
<rule ref="PSR1.Files.SideEffects">
<exclude-pattern>Decoder.php</exclude-pattern>
</rule>
</ruleset>

View File

@@ -18,5 +18,5 @@ fi
if [ $RUN_LINTER ]; then
vendor/bin/php-cs-fixer fix --verbose --diff --dry-run --config=.php_cs
vendor/bin/phpcs --standard=PSR2 src/
vendor/bin/phpcs --standard=.phpcs-ruleset.xml src/
fi

View File

@@ -2,6 +2,7 @@
namespace MaxMind\Db\Reader;
// @codingStandardsIgnoreLine
\define(__NAMESPACE__ . '\_MM_MAX_INT_BYTES', log(PHP_INT_MAX, 2) / 8);
class Decoder