forked from thegreenter/greenter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php_cs.dist
More file actions
23 lines (22 loc) · 723 Bytes
/
.php_cs.dist
File metadata and controls
23 lines (22 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
$config = PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'@PSR1' => true,
'@PSR2' => true,
'yoda_style' => false
]);
// special handling of fabbot.io service if it's using too old PHP CS Fixer version
try {
PhpCsFixer\FixerFactory::create()
->registerBuiltInFixers()
->registerCustomFixers($config->getCustomFixers())
->useRuleSet(new PhpCsFixer\RuleSet($config->getRules()));
} catch (PhpCsFixer\ConfigurationException\InvalidConfigurationException $e) {
$config->setRules([]);
} catch (UnexpectedValueException $e) {
$config->setRules([]);
} catch (InvalidArgumentException $e) {
$config->setRules([]);
}
return $config;