1
0
Fork 0
mirror of https://github.com/archtechx/template.git synced 2025-12-12 21:34:04 +00:00

Merge pull request #1 from shuvroroy/feature/php-cs-fixer-3

Migrate to PHP-CS-Fixer 3.x
This commit is contained in:
Samuel Štancl 2021-05-24 17:02:33 +02:00 committed by GitHub
commit 277b63ab32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -44,7 +44,7 @@ jobs:
- name: Install php-cs-fixer
run: composer global require friendsofphp/php-cs-fixer
- name: Run php-cs-fixer
run: $HOME/.composer/vendor/bin/php-cs-fixer fix --config=.php_cs.php
run: $HOME/.composer/vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php
- name: Commit changes from php-cs-fixer
uses: EndBug/add-and-commit@v5
with:

2
.gitignore vendored
View file

@ -2,7 +2,7 @@
package-lock.json
composer.lock
vendor/
.php_cs.cache
.php-cs-fixer.cache
.vscode/
coverage/
node_modules

View file

@ -42,7 +42,7 @@ $rules = [
'linebreak_after_opening_tag' => true,
'line_ending' => true,
'lowercase_cast' => true,
'lowercase_constants' => true,
'constant_case' => true,
'lowercase_keywords' => true,
'lowercase_static_reference' => true, // added from Symfony
'magic_method_casing' => true, // added from Symfony
@ -137,7 +137,7 @@ $finder = Finder::create()
->ignoreDotFiles(true)
->ignoreVCS(true);
return Config::create()
return (new Config())
->setFinder($finder)
->setRules($rules)
->setRiskyAllowed(true)