Skip to content

Commit

Permalink
PHP cs fixer JoBinsJP#23
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeNauhc committed Feb 20, 2023
1 parent b20b4b3 commit f423287
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ vendor
.phpunit.result.cache
composer.lock
.php_cs.cache
.php-cs-fixer.cache
16 changes: 16 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

$config = new PhpCsFixer\Config();
return $config
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true, // ここにルール追記
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude([
'vendor'
])
->in(__DIR__)
)
;
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
"test": "vendor/bin/phpunit",
"psalm": "vendor/bin/psalm",
"pint": "vendor/bin/pint",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
"test-coverage": "vendor/bin/phpunit --coverage-html coverage",
"style-check": "php-cs-fixer fix --dry-run --verbose --diff",
"style-fix": "php-cs-fixer fix --verbose"
},
"autoload-dev": {
"psr-4": {
Expand All @@ -46,7 +48,8 @@
"require-dev": {
"orchestra/testbench": "^6.15",
"phpunit/phpunit": "^9.0",
"vimeo/psalm": "^4.7"
"vimeo/psalm": "^4.7",
"friendsofphp/php-cs-fixer": "^3.14"
},
"extra": {
"laravel": {
Expand Down

0 comments on commit f423287

Please sign in to comment.