-
Notifications
You must be signed in to change notification settings - Fork 2
/
.php_cs.dist
33 lines (26 loc) · 887 Bytes
/
.php_cs.dist
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
<?php
/*
* Additional rules or rules to override.
* These rules will be added to default rules or will override them if the same key already exists.
*/
$additionalRules = [
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
];
$rulesProvider = new Facile\CodingStandards\Rules\CompositeRulesProvider([
new Facile\CodingStandards\Rules\DefaultRulesProvider(),
new Facile\CodingStandards\Rules\ArrayRulesProvider($additionalRules),
]);
$config = PhpCsFixer\Config::create();
$config->setRules($rulesProvider->getRules());
$finder = PhpCsFixer\Finder::create();
/*
* You can set manually these paths:
*/
$autoloadPathProvider = new Facile\CodingStandards\AutoloadPathProvider();
$finder->in($autoloadPathProvider->getPaths());
$config->setFinder($finder);
return $config;