Skip to content

Commit

Permalink
Migrate to PHP-CS-Fixer 3.x (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuvroroy authored Jun 4, 2021
1 parent 7198c98 commit 28e77b8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Fix style
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs --allow-risky=yes
args: --config=.php-cs-fixer.dist.php --allow-risky=yes

- name: Extract branch name
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ composer.lock
vendor
docs
.phpunit.result.cache
.php_cs.cache
.php-cs-fixer.cache
9 changes: 5 additions & 4 deletions .php_cs → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
->ignoreDotFiles(true)
->ignoreVCS(true);

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config)
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline_array' => true,
'trailing_comma_in_multiline' => true,
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
Expand All @@ -31,7 +31,8 @@
'phpdoc_var_without_name' => true,
'class_attributes_separation' => [
'elements' => [
'method', 'property',
'method' => 'one',
'property' => 'one',
],
],
'method_argument_space' => [
Expand Down
1 change: 0 additions & 1 deletion tests/CookieConsentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,4 @@ public function it_contains_the_necessary_css_classes_for_javascript_functionali
$this->assertStringContainsString('js-cookie-consent', $html);
$this->assertStringContainsString('js-cookie-consent-agree', $html);
}

}

0 comments on commit 28e77b8

Please sign in to comment.