-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.php-cs-fixer.php
29 lines (25 loc) · 1014 Bytes
/
.php-cs-fixer.php
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
<?php declare(strict_types=1);
$additionalRules = [
'class_attributes_separation' => false,
'declare_strict_types' => true,
'indentation_type' => true,
'phpdoc_to_comment' => false,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_align' => true,
'nullable_type_declaration_for_default_null_value' => true,
'lambda_not_used_import' => true,
'phpdoc_add_missing_param_annotation' => true,
];
$rulesProvider = new Facile\CodingStandards\Rules\CompositeRulesProvider([
new Facile\CodingStandards\Rules\DefaultRulesProvider(),
new Facile\CodingStandards\Rules\ArrayRulesProvider($additionalRules),
]);
$finder = PhpCsFixer\Finder::create();
$autoloadPathProvider = new Facile\CodingStandards\AutoloadPathProvider();
$finder->in($autoloadPathProvider->getPaths());
$config = new PhpCsFixer\Config();
$config->setRules($rulesProvider->getRules());
$config->setRiskyAllowed(true);
$config->setUsingCache(false);
$config->setFinder($finder);
return $config;