-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9f3369
commit b679711
Showing
3 changed files
with
28 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,43 +11,29 @@ | |
* the LICENSE file that was distributed with this source code. | ||
*/ | ||
|
||
use CodeIgniter\CodingStandard\CodeIgniter4; | ||
use Nexus\CsConfig\Factory; | ||
use Nexus\CsConfig\Fixer\Comment\NoCodeSeparatorCommentFixer; | ||
use Nexus\CsConfig\FixerGenerator; | ||
use PhpCsFixer\ConfigInterface; | ||
use PhpCsFixer\Finder; | ||
|
||
/** @var ConfigInterface $config */ | ||
$config = require __DIR__ . '/.php-cs-fixer.dist.php'; | ||
|
||
$finder = Finder::create() | ||
->files() | ||
->in([ | ||
__DIR__ . '/tests', | ||
]) | ||
->exclude([ | ||
]) | ||
->notPath([ | ||
'_support/View/Cells/multiplier.php', | ||
'_support/View/Cells/colors.php', | ||
'_support/View/Cells/addition.php', | ||
]) | ||
->notName('#Foobar.php$#') | ||
->append([ | ||
]); | ||
->notName('#Foobar.php$#'); | ||
|
||
$overrides = [ | ||
'void_return' => true, | ||
]; | ||
|
||
$options = [ | ||
'cacheFile' => 'build/.php-cs-fixer.tests.cache', | ||
'finder' => $finder, | ||
'customFixers' => FixerGenerator::create('vendor/nexusphp/cs-config/src/Fixer', 'Nexus\\CsConfig\\Fixer'), | ||
'customRules' => [ | ||
NoCodeSeparatorCommentFixer::name() => true, | ||
], | ||
]; | ||
|
||
return Factory::create(new CodeIgniter4(), $overrides, $options)->forLibrary( | ||
'CodeIgniter 4 framework', | ||
'CodeIgniter Foundation', | ||
'[email protected]' | ||
); | ||
return $config | ||
->setFinder($finder) | ||
->setCacheFile('build/.php-cs-fixer.tests.cache') | ||
->setRules(array_merge($config->getRules(), $overrides)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters