Projekt

Obecné

Profil

Stáhnout (3.2 KB) Statistiky
| Větev: | Revize:
1
<?php
2
$finder = PhpCsFixer\Finder::create()
3
    ->in(__DIR__.'/src')
4
    ->notPath('Kernel.php')
5

    
6
;
7

    
8
return PhpCsFixer\Config::create()
9
    ->setRules(array(
10
        '@Symfony' => true,
11
        'array_indentation' => true,
12
        'array_syntax' => array('syntax' => 'short'),
13
        'combine_consecutive_unsets' => true,
14
        'method_separation' => true,
15
        'no_multiline_whitespace_before_semicolons' => true,
16
        'single_quote' => true,
17

    
18
        'binary_operator_spaces' => array(
19
            'align_double_arrow' => false,
20
            'align_equals' => false,
21
        ),
22
        'blank_line_before_statement' => array('statements' => array(
23
            'return',
24
        )),
25
        'braces' => array(
26
            'allow_single_line_closure' => true,
27
            'position_after_functions_and_oop_constructs' => 'same'
28
        ),
29
        'cast_spaces' => true,
30
        'class_definition' => array('singleLine' => true),
31
        'concat_space' => array('spacing' => 'none'),
32
        'hash_to_slash_comment' => true,
33
        'no_extra_consecutive_blank_lines' => array(
34
            'curly_brace_block',
35
            'extra',
36
            'break',
37
            'continue',
38
            'parenthesis_brace_block',
39
            'return',
40
            'square_brace_block',
41
            'throw',
42
            'use',
43
        ),
44
        'no_whitespace_before_comma_in_array' => true,
45
        'ordered_imports' => array('imports_order' => array(
46
            'const',
47
            'class',
48
            'function'
49
        ), 'sort_algorithm' => 'length'),
50
        'short_scalar_cast' => true,
51
        'simplified_null_return' => true,
52
        'single_import_per_statement' => true,
53
        'single_line_after_imports' => true,
54
        'single_line_comment_style' => true,
55
        'standardize_increment' => true,
56
        'standardize_not_equals' => true,
57
        'space_after_semicolon' => array(
58
            'remove_in_empty_for_expressions' => true,
59
        ),
60
        'switch_case_semicolon_to_colon' => true,
61
        'switch_case_space' => true,
62
        'ternary_operator_spaces' => true,
63
        'ternary_to_null_coalescing' => true,
64
        'trim_array_spaces' => true,
65
        'unary_operator_spaces' => true,
66
        'visibility_required' => true,
67
        'whitespace_after_comma_in_array' => true,
68
        'align_multiline_comment' => true,
69
        'constant_case' => true,
70
        'declare_equal_normalize' => true,
71
        'elseif' => true,
72
        'function_declaration' => true,
73
        'function_typehint_space' => true,
74
        'global_namespace_import' => array(
75
            'import_classes' => true,
76
            'import_constants' => true,
77
            'import_functions' => true,
78
        ),
79
        'include' => true,
80
        'linebreak_after_opening_tag' => true,
81
        'list_syntax' => array('syntax' => 'short'),
82
        'lowercase_cast' => true,
83
        'lowercase_keywords' => true,
84
        'lowercase_static_reference' => true,
85
        'magic_constant_casing' => true,
86
        'magic_method_casing' => true,
87
        'method_argument_space' => array(
88
            'on_multiline' => 'ensure_fully_multiline',
89
            'keep_multiple_spaces_after_comma' => false,
90
        )
91
    ))
92
    //->setIndent("\t")
93
    ->setLineEnding("\n")
94
    ->setFinder($finder)
95
;
(2-2/7)