Skip to content

Commit 28e77b8

Browse files
authoredJun 4, 2021
Migrate to PHP-CS-Fixer 3.x (#161)
1 parent 7198c98 commit 28e77b8

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed
 

‎.github/workflows/php-cs-fixer.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Fix style
1414
uses: docker://oskarstark/php-cs-fixer-ga
1515
with:
16-
args: --config=.php_cs --allow-risky=yes
16+
args: --config=.php-cs-fixer.dist.php --allow-risky=yes
1717

1818
- name: Extract branch name
1919
shell: bash

‎.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ composer.lock
33
vendor
44
docs
55
.phpunit.result.cache
6-
.php_cs.cache
6+
.php-cs-fixer.cache

‎.php_cs ‎.php-cs-fixer.dist.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
->ignoreDotFiles(true)
1414
->ignoreVCS(true);
1515

16-
return PhpCsFixer\Config::create()
16+
return (new PhpCsFixer\Config)
1717
->setRules([
1818
'@PSR2' => true,
1919
'array_syntax' => ['syntax' => 'short'],
20-
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
20+
'ordered_imports' => ['sort_algorithm' => 'alpha'],
2121
'no_unused_imports' => true,
2222
'not_operator_with_successor_space' => true,
23-
'trailing_comma_in_multiline_array' => true,
23+
'trailing_comma_in_multiline' => true,
2424
'phpdoc_scalar' => true,
2525
'unary_operator_spaces' => true,
2626
'binary_operator_spaces' => true,
@@ -31,7 +31,8 @@
3131
'phpdoc_var_without_name' => true,
3232
'class_attributes_separation' => [
3333
'elements' => [
34-
'method', 'property',
34+
'method' => 'one',
35+
'property' => 'one',
3536
],
3637
],
3738
'method_argument_space' => [

‎tests/CookieConsentTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,4 @@ public function it_contains_the_necessary_css_classes_for_javascript_functionali
4747
$this->assertStringContainsString('js-cookie-consent', $html);
4848
$this->assertStringContainsString('js-cookie-consent-agree', $html);
4949
}
50-
5150
}

0 commit comments

Comments
 (0)
Please sign in to comment.