Skip to content

Instantly share code, notes, and snippets.

@alexanderkatkov
Last active March 19, 2022 19:19
Show Gist options
  • Save alexanderkatkov/c3d762e86f16a58e927289d211727e5a to your computer and use it in GitHub Desktop.
Save alexanderkatkov/c3d762e86f16a58e927289d211727e5a to your computer and use it in GitHub Desktop.
Personal PHP_CodeSniffer settings
<?xml version="1.0" encoding="UTF-8"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<arg name="basepath" value="."/>
<arg name="cache" value=".phpcs-cache"/>
<arg name="colors" />
<arg name="extensions" value="php"/>
<arg name="parallel" value="75" />
<rule ref="PSR2"/>
<file>bin/</file>
<file>public/</file>
<file>src/</file>
<file>tests/</file>
<exclude-pattern>*/bin/.phpunit/*</exclude-pattern>
<exclude-pattern>*/Migrations/*</exclude-pattern>
<exclude-pattern>src/Kernel.php</exclude-pattern>
<exclude-pattern>public/index.php</exclude-pattern>
<exclude-pattern>config/bootstrap.php</exclude-pattern>
<config name="installed_paths" value="../../slevomat/coding-standard"/>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="linesCountBeforeDeclare" value="0"/>
<property name="newlinesCountAfterDeclare" value="2"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<rule ref="SlevomatCodingStandard.ControlStructures.RequireYodaComparison"/>
<rule ref="Generic.Files.LineEndings">
<exclude name="Generic.Files.LineEndings.InvalidEOLChar"/>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Generic.Files.LineLength"/>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="PSR2.Files.EndFileNewline"/>
<rule ref="PSR2.Namespaces.NamespaceDeclaration"/>
<rule ref="PSR2.Namespaces.UseDeclaration"/>
<rule ref="Zend.Files.ClosingTag"/>
</ruleset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment