|
6 | 6 | // do not fix views |
7 | 7 | ->notName('*.html.php'); |
8 | 8 |
|
9 | | -return PhpCsFixer\Config::create() |
10 | | - ->setRules([ |
| 9 | +$config = new PhpCsFixer\Config(); |
| 10 | +$config->setRules([ |
11 | 11 | '@PSR1' => true, |
12 | 12 | '@PSR2' => true, |
13 | 13 | 'array_syntax' => ['syntax' => 'short'], |
14 | 14 |
|
15 | 15 | 'header_comment' => [ |
16 | | - 'commentType' => 'PHPDoc', |
17 | | - 'header' => 'Pimcore' . PHP_EOL . PHP_EOL . |
18 | | - 'This source file is available under two different licenses:' . PHP_EOL . |
19 | | - '- GNU General Public License version 3 (GPLv3)' . PHP_EOL . |
20 | | - '- Pimcore Commercial License (PCL)' . PHP_EOL . |
21 | | - 'Full copyright and license information is available in' . PHP_EOL . |
22 | | - 'LICENSE.md which is distributed with this source code.' . PHP_EOL . |
23 | | - PHP_EOL . |
24 | | - ' @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)' . PHP_EOL . |
25 | | - ' @license http://www.pimcore.org/license GPLv3 and PCL' |
26 | | - ], |
| 16 | + 'comment_type' => 'PHPDoc', |
| 17 | + 'header' => |
| 18 | + 'This source file is available under the terms of the' . PHP_EOL . |
| 19 | + 'Pimcore Open Core License (POCL)' . PHP_EOL . |
| 20 | + 'Full copyright and license information is available in' . PHP_EOL . |
| 21 | + 'LICENSE.md which is distributed with this source code.' . PHP_EOL . |
| 22 | + PHP_EOL . |
| 23 | + ' @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)' . PHP_EOL . |
| 24 | + ' @license Pimcore Open Core License (POCL)' |
| 25 | + ], |
27 | 26 |
|
28 | | - // keep aligned = and => operators as they are: do not force aligning, but do not remove it |
29 | | - 'binary_operator_spaces' => ['align_double_arrow' => null, 'align_equals' => null], |
30 | | - |
31 | | - 'blank_line_before_return' => true, |
| 27 | + 'blank_line_before_statement' => true, |
32 | 28 | 'encoding' => true, |
33 | 29 | 'function_typehint_space' => true, |
34 | | - 'hash_to_slash_comment' => true, |
| 30 | + 'single_line_comment_style' => true, |
35 | 31 | 'lowercase_cast' => true, |
36 | 32 | 'magic_constant_casing' => true, |
37 | | - 'method_argument_space' => ['ensure_fully_multiline' => false], |
38 | | - 'method_separation' => true, |
| 33 | + 'method_argument_space' => ['on_multiline' => 'ignore'], |
| 34 | + 'class_attributes_separation' => true, |
39 | 35 | 'native_function_casing' => true, |
40 | 36 | 'no_blank_lines_after_class_opening' => true, |
41 | 37 | 'no_blank_lines_after_phpdoc' => true, |
42 | 38 | 'no_empty_comment' => true, |
43 | 39 | 'no_empty_phpdoc' => true, |
44 | 40 | 'no_empty_statement' => true, |
45 | | - 'no_extra_consecutive_blank_lines' => true, |
| 41 | + 'no_extra_blank_lines' => true, |
46 | 42 | 'no_leading_import_slash' => true, |
47 | 43 | 'no_leading_namespace_whitespace' => true, |
48 | 44 | 'no_short_bool_cast' => true, |
|
67 | 63 | 'standardize_not_equals' => true, |
68 | 64 | 'ternary_operator_spaces' => true, |
69 | 65 | 'whitespace_after_comma_in_array' => true, |
70 | | - ]) |
71 | | - ->setFinder($finder); |
| 66 | +]); |
| 67 | + |
| 68 | +$config->setFinder($finder); |
| 69 | +return $config; |
| 70 | + |
0 commit comments