Fix PHPCS config file

pull/65/head
Jeremy Benoist 5 years ago
parent 9a490fac07
commit 19b2a25d96
No known key found for this signature in database
GPG Key ID: BCA73962457ACC3C
  1. 4
      .github/workflows/coding-standards.yml
  2. 15
      .php-cs-fixer.php
  3. 2
      composer.json
  4. 2
      phpstan.neon

@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
php:
- "7.3"
- "7.4"
steps:
- name: "Checkout"
@ -30,7 +30,7 @@ jobs:
with:
coverage: "none"
php-version: "${{ matrix.php }}"
tools: cs2pr, composer:v1
tools: cs2pr, composer:v2
ini-values: "date.timezone=Europe/Paris"
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

@ -1,6 +1,11 @@
<?php
return PhpCsFixer\Config::create()
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude(['vendor', 'var', 'web'])
;
return (new PhpCsFixer\Config())
->setUsingCache(true)
->setRiskyAllowed(true)
->setRules([
@ -9,7 +14,7 @@ return PhpCsFixer\Config::create()
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'heredoc_to_nowdoc' => true,
'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'],
'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
@ -22,9 +27,5 @@ return PhpCsFixer\Config::create()
'strict_param' => true,
'concat_space' => ['spacing' => 'one'],
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude(['vendor'])
->in(__DIR__)
)
->setFinder($finder)
;

@ -32,7 +32,7 @@
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.14",
"monolog/monolog": "^1.24|^2.1",
"symfony/phpunit-bridge": "^4.2.3"
"symfony/phpunit-bridge": "^4.4|^5.3"
},
"suggest": {
"ext-tidy": "Used to clean up given HTML and to avoid problems with bad HTML structure."

@ -6,7 +6,7 @@ parameters:
# https://github.com/phpstan/phpstan/issues/694#issuecomment-350724288
bootstrapFiles:
- vendor/bin/.phpunit/phpunit-7.5-0/vendor/autoload.php
- vendor/bin/.phpunit/phpunit-8.5-0/vendor/autoload.php
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon

Loading…
Cancel
Save