Last active
April 3, 2018 14:53
-
-
Save havramar/fbc9f094870e8fec12fe to your computer and use it in GitHub Desktop.
PHPCS PSR2 standard with var_dump disallowed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"require": { | |
}, | |
"require-dev": { | |
"squizlabs/php_codesniffer": "2.*@dev" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<ruleset name="Custom Standard"> | |
<description>A little bit extended PSR2 standard</description> | |
<exclude-pattern>*/tests/*</exclude-pattern> | |
<exclude-pattern>*/data/*</exclude-pattern> | |
<rule ref="PSR2"/> | |
<rule ref="Squiz.PHP.ForbiddenFunctions"> | |
<properties> | |
<property name="forbiddenFunctions" type="array" value="var_dump=>NULL,sizeof=>count,delete=>unset,print=>echo,is_null=>NULL,create_function=>NULL"/> | |
</properties> | |
</rule> | |
</ruleset> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
var_dump('x'); | |
sizoef 'asdf'; | |
delete $x; | |
print 'asdf'; | |
is_null(null); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment