Browse Source

Add Code Sniffer config

tags/1.5.0
Anton Smirnov 1 month ago
parent
commit
8a2bd53227
2 changed files with 25 additions and 1 deletions
  1. +5
    -1
      composer.json
  2. +20
    -0
      phpcs.xml

+ 5
- 1
composer.json View File

@@ -24,13 +24,17 @@
"php": ">= 7.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "*",
"laminas/laminas-servicemanager": "^3.0",
"php-di/php-di": "^6.0",
"phpcompatibility/php-compatibility": "*",
"pimple/pimple": "^3.0",
"psr/http-server-middleware": "^1.0",
"psy/psysh": "*",
"silex/silex": "^2.0",
"slevomat/coding-standard": "*",
"slim/slim": "^3.0",
"sllh/composer-versions-check": "^2.0"
"sllh/composer-versions-check": "*",
"squizlabs/php_codesniffer": "*"
}
}

+ 20
- 0
phpcs.xml View File

@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<!--
@see https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset
-->
<ruleset name="Custom Standard" namespace="MyProject\CS\Standard">
<rule ref="PSR12">
<!-- PHP 7.1+ -->
<exclude name="PSR12.Properties.ConstantVisibility.NotFound"/>
</rule>
<rule ref="PHPCompatibility"/>
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses">
<properties>
<property name="caseSensitive">true</property>
</properties>
</rule>
<config name="testVersion" value="7.0-"/>
<file>src</file>
<exclude-pattern>*/vendor/*</exclude-pattern>
<ini name="memory_limit" value="2G"/>
</ruleset>

Loading…
Cancel
Save