Skip to content

Commit d5330a9

Browse files
authored
Merge pull request #65 from j0k3r/fix/php-cs
Fix PHPCS config file
2 parents 9a490fa + 635f896 commit d5330a9

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

.github/workflows/coding-standards.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
matrix:
2121
php:
22-
- "7.3"
22+
- "7.4"
2323

2424
steps:
2525
- name: "Checkout"
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
coverage: "none"
3232
php-version: "${{ matrix.php }}"
33-
tools: cs2pr, composer:v1
33+
tools: cs2pr, composer:v2
3434
ini-values: "date.timezone=Europe/Paris"
3535
env:
3636
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<?php
22

3-
return PhpCsFixer\Config::create()
3+
$finder = (new PhpCsFixer\Finder())
4+
->in(__DIR__)
5+
->exclude(['vendor', 'var', 'web'])
6+
;
7+
8+
return (new PhpCsFixer\Config())
49
->setUsingCache(true)
510
->setRiskyAllowed(true)
611
->setRules([
@@ -9,7 +14,7 @@
914
'array_syntax' => ['syntax' => 'short'],
1015
'combine_consecutive_unsets' => true,
1116
'heredoc_to_nowdoc' => true,
12-
'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'],
17+
'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
1318
'no_unreachable_default_argument_value' => true,
1419
'no_useless_else' => true,
1520
'no_useless_return' => true,
@@ -22,9 +27,5 @@
2227
'strict_param' => true,
2328
'concat_space' => ['spacing' => 'one'],
2429
])
25-
->setFinder(
26-
PhpCsFixer\Finder::create()
27-
->exclude(['vendor'])
28-
->in(__DIR__)
29-
)
30+
->setFinder($finder)
3031
;

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ before_install:
2424

2525
install:
2626
- if [ "$CS_FIXER" != "run" ]; then composer remove friendsofphp/php-cs-fixer --dev --no-progress --no-update ; fi;
27-
- composer update --prefer-dist --no-progress --no-suggest -o $
27+
- composer update --prefer-dist --no-progress -o
2828
- php vendor/bin/simple-phpunit install
2929

3030
before_script:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"require-dev": {
3333
"friendsofphp/php-cs-fixer": "^2.14",
3434
"monolog/monolog": "^1.24|^2.1",
35-
"symfony/phpunit-bridge": "^4.2.3"
35+
"symfony/phpunit-bridge": "^4.4|^5.3"
3636
},
3737
"suggest": {
3838
"ext-tidy": "Used to clean up given HTML and to avoid problems with bad HTML structure."

0 commit comments

Comments
 (0)