Browse Source

De la config : Composer --dev, phpcs, phpstan

master
Matthieu Marcillaud 8 months ago
parent
commit
c79af45b48
  1. 7
      .gitignore
  2. 18
      composer.json
  3. 15
      phpcs.xml.dist
  4. 12
      phpstan.neon.dist

7
.gitignore vendored

@ -0,0 +1,7 @@
/vendor/
/composer.phar
/composer.lock
/phpcs.xml
/phpstan.neon
/.php_cs.cache
/.php_cs.txt

18
composer.json

@ -0,0 +1,18 @@
{
"require": {
"php": "^7.4 || ^8.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
"phpstan/phpstan": "^1.4",
"spip/coding-standards": "^1.2"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
},
"platform": {
"php": "7.4.27"
}
}
}

15
phpcs.xml.dist

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<ruleset>
<file>.</file>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>lang/*</exclude-pattern>
<exclude-pattern>lib/*</exclude-pattern>
<rule ref="SPIP41"/>
<config name="ignore_warnings_on_exit" value="1"/>
<arg name="cache" value=".php_cs.cache"/>
<arg name="report-full" value=".php_cs.txt"/>
<arg name="report-summary"/>
<arg value="s"/>
</ruleset>

12
phpstan.neon.dist

@ -0,0 +1,12 @@
includes:
- phpstan-baseline.neon
parameters:
paths:
- .
excludePaths:
analyseAndScan:
- vendor
- lang
- lib
level: 0
Loading…
Cancel
Save