Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Commit efc60bc

Browse files
add phpcsfixer config
1 parent 3176db3 commit efc60bc

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.php-cs-fixer.dist.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->in(__DIR__)
5+
->ignoreDotFiles(true)
6+
->ignoreVCS(true)
7+
->exclude(array('build', 'vendor'))
8+
->files()
9+
->name('*.php')
10+
;
11+
12+
$config = new PhpCsFixer\Config();
13+
14+
return $config
15+
->setUsingCache(true)
16+
->setRiskyAllowed(true)
17+
->setFinder($finder)
18+
->setRules(array(
19+
'@Symfony' => true,
20+
'@Symfony:risky' => true,
21+
'array_syntax' => ['syntax' => 'short'],
22+
'fopen_flags' => false,
23+
'ordered_imports' => true,
24+
'protected_to_private' => false,
25+
// Part of @Symfony:risky in PHP-CS-Fixer 2.13.0. To be removed from the config file once upgrading
26+
'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced', 'strict' => true],
27+
// Part of future @Symfony ruleset in PHP-CS-Fixer To be removed from the config file once upgrading
28+
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
29+
'single_line_throw' => false,
30+
// this must be disabled because the output of some tests include NBSP characters
31+
'non_printable_character' => false,
32+
))
33+
;

0 commit comments

Comments
 (0)