-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php_cs.dist
45 lines (42 loc) · 1.91 KB
/
.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
34
35
36
37
38
39
40
41
42
43
44
45
<?php
if (!file_exists(__DIR__ . '/src')) {
exit(0);
}
$config = PhpCsFixer\Config::create();
$config
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHPUnit48Migration:risky' => true,
'php_unit_no_expectation_annotation' => false,
// part of `PHPUnitXYMigration:risky` ruleset, to be enabled when PHPUnit 4.x support will be dropped, as we don't want to rewrite exceptions handling twice
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'fopen_flags' => false,
'ordered_imports' => true,
'protected_to_private' => false,
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true],
'yoda_style' => false,
'phpdoc_inline_tag' => false,
'phpdoc_annotation_without_dot' => false,
'cast_spaces' => ['space' => 'none'],
// Part of @Symfony:risky in PHP-CS-Fixer 2.13.0. To be removed from the config file once upgrading
'native_function_invocation' => [
'include' => ['@compiler_optimized'],
'scope' => 'namespaced',
],
// Part of future @Symfony ruleset in PHP-CS-Fixer To be removed from the config file once upgrading
'phpdoc_types_order' => [
'null_adjustment' => 'always_last',
'sort_algorithm' => 'none',
],
])
->setCacheFile('.phpcs-cache')
->setRiskyAllowed(true)
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->append([__FILE__])
->notPath('Kernel.php')
);
return $config;