Merge pull request #65 from j0k3r/fix/php-cs

Fix PHPCS config file
pull/66/head
Jérémy Benoist 5 years ago committed by GitHub
commit d5330a9c28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .github/workflows/coding-standards.yml
  2. 15
      .php-cs-fixer.php
  3. 2
      .travis.yml
  4. 2
      composer.json

@ -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)
;

@ -24,7 +24,7 @@ before_install:
install:
- if [ "$CS_FIXER" != "run" ]; then composer remove friendsofphp/php-cs-fixer --dev --no-progress --no-update ; fi;
- composer update --prefer-dist --no-progress --no-suggest -o $
- composer update --prefer-dist --no-progress -o
- php vendor/bin/simple-phpunit install
before_script:

@ -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."

Loading…
Cancel
Save