Skip to content

Commit

Permalink
php-cs-fixer が動作するよう修正
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess committed Jul 22, 2022
1 parent 92aa48c commit ad35a22
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ node_modules
###< symfony/phpunit-bridge ###

###> friendsofphp/php-cs-fixer ###
.php_cs
.php_cs.cache
/.php-cs-fixer.cache
/.php-cs-fixer.*.php
###< friendsofphp/php-cs-fixer ###
9 changes: 7 additions & 2 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (php_sapi_name() !== 'cli') {
throw new \LogicException();
}

$header = <<<EOL
This file is part of EC-CUBE
Expand All @@ -24,14 +28,15 @@
'header_comment' => ['header' => $header],
];

$finder = PhpCsFixer\Finder::create()
$finder = \PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
->in(__DIR__.'/app')
->in(__DIR__.'/codeception')
->name('*.php')
;
return PhpCsFixer\Config::create()
$config = new \PhpCsFixer\Config();
return $config
->setRules($rules)
->setFinder($finder)
;
2 changes: 1 addition & 1 deletion package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rm -rf $WORKSPACE/.editorconfig
rm -rf $WORKSPACE/.gitignore
rm -rf $WORKSPACE/.buildpath
rm -rf $WORKSPACE/.gitmodules
rm -rf $WORKSPACE/.php_cs.dist
rm -rf $WORKSPACE/.php-cs-fixler.*
rm -rf $WORKSPACE/phpunit.xml.dist
rm -rf $WORKSPACE/phpstan.neon.dist
rm -rf $WORKSPACE/app.json
Expand Down

0 comments on commit ad35a22

Please sign in to comment.