1
1
<?php
2
- use Symfony \CS \Config \Config ;
3
- use Symfony \CS \Finder \DefaultFinder ;
4
- use Symfony \CS \Fixer \Contrib \HeaderCommentFixer ;
5
- use Symfony \CS \FixerInterface ;
6
2
7
- $ finder = DefaultFinder::create ()
8
- ->exclude ('fixtures ' )
3
+ $ config = new phootwork \fixer \Config ();
4
+ $ config ->getFinder ()
5
+ ->exclude (['fixtures ' ])
9
6
->in (__DIR__ . '/src ' )
10
- ->in (__DIR__ . '/tests ' )
11
- ;
7
+ ->in (__DIR__ . '/tests ' );
12
8
13
- return Config::create ()
14
- ->level (FixerInterface::NONE_LEVEL )
15
- ->finder ($ finder )
16
- ->setUsingLinter (true )
17
- ->setUsingCache (false )
18
- ->fixers ([
19
- 'encoding ' ,
20
- 'short_tag ' ,
21
- 'eof_ending ' ,
22
- 'function_call_space ' ,
23
- 'function_declaration ' ,
24
- 'line_after_namespace ' ,
25
- 'linefeed ' ,
26
- 'lowercase_constants ' ,
27
- 'lowercase_keywords ' ,
28
- 'method_argument_space ' ,
29
- 'multiple_use ' ,
30
- 'parenthesis ' ,
31
- 'php_closing_tag ' ,
32
- 'single_line_after_imports ' ,
33
- 'trailing_spaces ' ,
34
- 'visibility ' ,
35
- 'array_element_no_space_before_comma ' ,
36
- 'array_element_white_space_after_comma ' ,
37
- 'double_arrow_multiline_whitespaces ' ,
38
- 'duplicate_semicolon ' ,
39
- 'extra_empty_lines ' ,
40
- 'function_typehint_space ' ,
41
- 'namespace_no_leading_whitespace ' ,
42
- 'no_empty_lines_after_phpdocs ' ,
43
- 'phpdoc_scalar ' ,
44
- 'phpdoc_types ' ,
45
- 'remove_leading_slash_use ' ,
46
- 'remove_lines_between_uses ' ,
47
- 'self_accessor ' ,
48
- 'single_array_no_trailing_comma ' ,
49
- 'single_quote ' ,
50
- 'unused_use ' ,
51
- 'whitespacy_lines ' ,
52
- 'concat_with_spaces ' ,
53
- 'ordered_use ' ,
54
- 'short_array_syntax ' ,
55
- ])
56
- ;
9
+ $ cacheDir = getenv ('TRAVIS ' ) ? getenv ('HOME ' ) . '/.php-cs-fixer ' : __DIR__ ;
10
+
11
+ $ config ->setCacheFile ($ cacheDir . '/.php_cs.cache ' );
12
+
13
+ return $ config ;
0 commit comments