| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,70 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+$header = <<<EOF |
|
| 4 |
+This file is part of eSales Media ContentHelperBundle. |
|
| 5 |
+ |
|
| 6 |
+(c) Benjamin Roth |
|
| 7 |
+ |
|
| 8 |
+@license proprietary |
|
| 9 |
+EOF; |
|
| 10 |
+ |
|
| 11 |
+$finder = PhpCsFixer\Finder::create() |
|
| 12 |
+ ->exclude('Resources')
|
|
| 13 |
+ ->in([__DIR__.'/src', __DIR__.'/tests']) |
|
| 14 |
+; |
|
| 15 |
+ |
|
| 16 |
+return PhpCsFixer\Config::create() |
|
| 17 |
+ ->setRules([ |
|
| 18 |
+ '@Symfony' => true, |
|
| 19 |
+ '@Symfony:risky' => true, |
|
| 20 |
+ '@PHPUnit60Migration:risky' => true, |
|
| 21 |
+ 'align_multiline_comment' => true, |
|
| 22 |
+ 'array_indentation' => true, |
|
| 23 |
+ 'array_syntax' => ['syntax' => 'short'], |
|
| 24 |
+ 'combine_consecutive_issets' => true, |
|
| 25 |
+ 'combine_consecutive_unsets' => true, |
|
| 26 |
+ 'comment_to_phpdoc' => true, |
|
| 27 |
+ 'compact_nullable_typehint' => true, |
|
| 28 |
+ 'escape_implicit_backslashes' => true, |
|
| 29 |
+ 'fopen_flags' => false, |
|
| 30 |
+ 'fully_qualified_strict_types' => true, |
|
| 31 |
+ 'general_phpdoc_annotation_remove' => [ |
|
| 32 |
+ 'expectedException', |
|
| 33 |
+ 'expectedExceptionMessage', |
|
| 34 |
+ ], |
|
| 35 |
+ 'header_comment' => ['header' => $header], |
|
| 36 |
+ 'heredoc_to_nowdoc' => true, |
|
| 37 |
+ 'linebreak_after_opening_tag' => true, |
|
| 38 |
+ 'multiline_comment_opening_closing' => true, |
|
| 39 |
+ 'multiline_whitespace_before_semicolons' => [ |
|
| 40 |
+ 'strategy' => 'new_line_for_chained_calls', |
|
| 41 |
+ ], |
|
| 42 |
+ 'native_function_invocation' => [ |
|
| 43 |
+ 'include' => ['@compiler_optimized'], |
|
| 44 |
+ ], |
|
| 45 |
+ 'no_alternative_syntax' => true, |
|
| 46 |
+ 'no_binary_string' => true, |
|
| 47 |
+ 'no_null_property_initialization' => true, |
|
| 48 |
+ 'no_superfluous_elseif' => true, |
|
| 49 |
+ 'no_unreachable_default_argument_value' => true, |
|
| 50 |
+ 'no_useless_else' => true, |
|
| 51 |
+ 'no_useless_return' => true, |
|
| 52 |
+ 'ordered_class_elements' => true, |
|
| 53 |
+ 'ordered_imports' => true, |
|
| 54 |
+ 'php_unit_strict' => true, |
|
| 55 |
+ 'phpdoc_add_missing_param_annotation' => true, |
|
| 56 |
+ 'phpdoc_order' => true, |
|
| 57 |
+ 'phpdoc_trim_consecutive_blank_line_separation' => true, |
|
| 58 |
+ 'phpdoc_types_order' => [ |
|
| 59 |
+ 'null_adjustment' => 'always_last', |
|
| 60 |
+ 'sort_algorithm' => 'none', |
|
| 61 |
+ ], |
|
| 62 |
+ 'return_assignment' => true, |
|
| 63 |
+ 'strict_comparison' => true, |
|
| 64 |
+ 'strict_param' => true, |
|
| 65 |
+ 'string_line_ending' => true, |
|
| 66 |
+ ]) |
|
| 67 |
+ ->setFinder($finder) |
|
| 68 |
+ ->setRiskyAllowed(true) |
|
| 69 |
+ ->setUsingCache(false) |
|
| 70 |
+; |