forked from ksassnowski/venture
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
45 lines (37 loc) · 1.29 KB
/
.php-cs-fixer.php
File metadata and controls
45 lines (37 loc) · 1.29 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
<?php declare(strict_types=1);
use Ergebnis\PhpCsFixer\Config;
$header = <<<EOF
Copyright (c) 2023 Kai Sassnowski
For the full copyright and license information, please view
the LICENSE file that was distributed with this source code.
@see https://github.com/ksassnowski/venture
EOF;
$ruleSet = Config\RuleSet\Php81::create()
->withRules(
Config\Rules::fromArray([
'php_unit_test_class_requires_covers' => false,
'php_unit_internal_class' => false,
'phpdoc_to_property_type' => false,
'error_suppression' => [
'noise_remaining_usages' => false,
],
'final_class' => false,
'final_public_method_for_abstract_class' => false,
'protected_to_private' => false,
'strict_comparison' => false,
'static_lambda' => false,
'class_attributes_separation' => [
'elements' => [
'const' => 'only_if_meta',
'method' => 'one',
'property' => 'one',
'trait_import' => 'none',
],
],
]))
->withHeader($header);
$config = Config\Factory::fromRuleSet($ruleSet);
$config->getFinder()
->in([__DIR__.'/src', __DIR__.'/tests']);
$config->setCacheFile(__DIR__ . '/.build/php-cs-fixer/.php-cs-fixer.cache');
return $config;