Created
September 23, 2017 12:53
-
-
Save matthewbdaly/615db4961ceed728fdebcd8d2c257e53 to your computer and use it in GitHub Desktop.
Catch var_dump(), die() or dd() with PHP CodeSniffer, as well as enforcing PSR2 and various comment standards
This file contains 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="PHP_CodeSniffer"> | |
<description>Coding standard for a Laravel app.</description> | |
| |
<file>app</file> | |
<file>tests</file> | |
| |
| |
<exclude-pattern>*/migrations/*</exclude-pattern> | |
| |
<arg value="np"/> | |
| |
<rule ref="PSR2"/> | |
<rule ref="Squiz.Commenting.FunctionComment" /> | |
<rule ref="Squiz.Commenting.FunctionCommentThrowTag" /> | |
<rule ref="Squiz.Commenting.ClassComment" /> | |
<rule ref="Squiz.Commenting.VariableComment" /> | |
<rule ref="Squiz.PHP.ForbiddenFunctions"> | |
<properties> | |
<property name="forbiddenFunctions" type="array" value="eval=>NULL,dd=>NULL,die=>NULL,var_dump=>NULL,sizeof=>count,delete=>unset,print=>echo,create_function=>NULL"/> | |
</properties> | |
</rule> | |
</ruleset> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment