-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
64 lines (57 loc) · 1.89 KB
/
.php-cs-fixer.dist.php
File metadata and controls
64 lines (57 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
declare(strict_types=1);
/**
* This file is part of the Nexus Assert library.
*
* (c) 2025 John Paul E. Balandan, CPA <paulbalandan@gmail.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
use Nexus\CsConfig\Factory;
use Nexus\CsConfig\Ruleset\Nexus82;
use PhpCsFixer\Finder;
use PhpCsFixerCustomFixers\Fixer;
use PhpCsFixerCustomFixers\Fixers;
$finder = Finder::create()
->files()
->in([
__DIR__.'/src',
__DIR__.'/tests',
__DIR__.'/tools',
])
->append([
__FILE__,
__DIR__.'/bin/generate',
__DIR__.'/bin/generate-readme',
])
;
$overrides = [
'final_public_method_for_abstract_class' => false,
];
$options = [
'cacheFile' => 'build/.php-cs-fixer.cache',
'finder' => $finder,
'customFixers' => new Fixers(),
'customRules' => [
Fixer\FunctionParameterSeparationFixer::name() => true,
Fixer\NoCommentedOutCodeFixer::name() => true,
Fixer\NoTrailingCommaInSinglelineFixer::name() => true,
Fixer\NoUselessCommentFixer::name() => true,
Fixer\NoUselessParenthesisFixer::name() => true,
Fixer\NoUselessWriteVisibilityFixer::name() => true,
Fixer\PhpUnitAssertArgumentsOrderFixer::name() => true,
Fixer\PhpUnitNoUselessReturnFixer::name() => true,
Fixer\PhpdocNoIncorrectVarAnnotationFixer::name() => true,
Fixer\PhpdocSelfAccessorFixer::name() => true,
Fixer\PhpdocTypesCommaSpacesFixer::name() => true,
Fixer\PhpdocVarAnnotationToAssertFixer::name() => true,
Fixer\PromotedConstructorPropertyFixer::name() => ['promote_only_existing_properties' => true],
],
];
return Factory::create(new Nexus82(), $overrides, $options)->forLibrary(
'the Nexus Assert library',
'John Paul E. Balandan, CPA',
'paulbalandan@gmail.com',
2025,
);