|
| 1 | +includes: |
| 2 | + - /composer/vendor/symplify/easy-coding-standard/config/php_codesniffer/psr2.neon |
| 3 | + - /composer/vendor/symplify/easy-coding-standard/config/php_cs_fixer/psr2.neon |
| 4 | + - /composer/vendor/symplify/easy-coding-standard/config/clean-code.neon |
| 5 | + |
| 6 | +checkers: |
| 7 | + PhpCsFixer\Fixer\Operator\ConcatSpaceFixer: |
| 8 | + spacing: one |
| 9 | + - PhpCsFixer\Fixer\Operator\NewWithBracesFixer |
| 10 | + |
| 11 | + PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer: |
| 12 | + tags: [ param ] |
| 13 | + |
| 14 | + - PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer |
| 15 | + - PhpCsFixer\Fixer\CastNotation\CastSpacesFixer |
| 16 | + - PhpCsFixer\Fixer\LanguageConstruct\DeclareEqualNormalizeFixer |
| 17 | + - PhpCsFixer\Fixer\FunctionNotation\FunctionTypehintSpaceFixer |
| 18 | + - PhpCsFixer\Fixer\Comment\HashToSlashCommentFixer |
| 19 | + - PhpCsFixer\Fixer\ControlStructure\IncludeFixer |
| 20 | + - PhpCsFixer\Fixer\CastNotation\LowercaseCastFixer |
| 21 | + - PhpCsFixer\Fixer\ClassNotation\MethodSeparationFixer |
| 22 | + - PhpCsFixer\Fixer\Casing\NativeFunctionCasingFixer |
| 23 | + - PhpCsFixer\Fixer\ClassNotation\NoBlankLinesAfterClassOpeningFixer |
| 24 | + - PhpCsFixer\Fixer\Phpdoc\NoBlankLinesAfterPhpdocFixer |
| 25 | + - PhpCsFixer\Fixer\Comment\NoEmptyCommentFixer |
| 26 | + - PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer |
| 27 | + - PhpCsFixer\Fixer\Semicolon\NoEmptyStatementFixer |
| 28 | + PhpCsFixer\Fixer\Whitespace\NoExtraConsecutiveBlankLinesFixer: |
| 29 | + - curly_brace_block |
| 30 | + - extra |
| 31 | + - parenthesis_brace_block |
| 32 | + - square_brace_block |
| 33 | + - throw |
| 34 | + - use |
| 35 | + - PhpCsFixer\Fixer\NamespaceNotation\NoLeadingNamespaceWhitespaceFixer |
| 36 | + - PhpCsFixer\Fixer\ArrayNotation\NoMultilineWhitespaceAroundDoubleArrowFixer |
| 37 | + - PhpCsFixer\Fixer\CastNotation\NoShortBoolCastFixer |
| 38 | + - PhpCsFixer\Fixer\Semicolon\NoSinglelineWhitespaceBeforeSemicolonsFixer |
| 39 | + - PhpCsFixer\Fixer\Whitespace\NoSpacesAroundOffsetFixer |
| 40 | + - PhpCsFixer\Fixer\ControlStructure\NoTrailingCommaInListCallFixer |
| 41 | + - PhpCsFixer\Fixer\ArrayNotation\NoTrailingCommaInSinglelineArrayFixer |
| 42 | + - PhpCsFixer\Fixer\ArrayNotation\TrailingCommaInMultilineArrayFixer |
| 43 | + - PhpCsFixer\Fixer\ControlStructure\NoUnneededControlParenthesesFixer |
| 44 | + - PhpCsFixer\Fixer\ArrayNotation\NoWhitespaceBeforeCommaInArrayFixer |
| 45 | + - PhpCsFixer\Fixer\Whitespace\NoWhitespaceInBlankLineFixer |
| 46 | + - PhpCsFixer\Fixer\ArrayNotation\NormalizeIndexBraceFixer |
| 47 | + - PhpCsFixer\Fixer\Operator\ObjectOperatorWithoutWhitespaceFixer |
| 48 | + - PhpCsFixer\Fixer\Phpdoc\PhpdocAnnotationWithoutDotFixer |
| 49 | + - PhpCsFixer\Fixer\Phpdoc\PhpdocIndentFixer |
| 50 | + - PhpCsFixer\Fixer\Phpdoc\PhpdocInlineTagFixer |
| 51 | + - PhpCsFixer\Fixer\Phpdoc\PhpdocNoAccessFixer |
| 52 | + - PhpCsFixer\Fixer\Phpdoc\PhpdocNoEmptyReturnFixer |
| 53 | + - PhpCsFixer\Fixer\Phpdoc\PhpdocNoPackageFixer |
| 54 | + - PhpCsFixer\Fixer\Phpdoc\PhpdocNoUselessInheritdocFixer |
| 55 | + - PhpCsFixer\Fixer\Phpdoc\PhpdocScalarFixer |
| 56 | + - PhpCsFixer\Fixer\Phpdoc\PhpdocSingleLineVarSpacingFixer |
| 57 | + - PhpCsFixer\Fixer\Phpdoc\PhpdocToCommentFixer |
| 58 | + - PhpCsFixer\Fixer\Phpdoc\PhpdocTrimFixer |
| 59 | + - PhpCsFixer\Fixer\Phpdoc\PhpdocTypesFixer |
| 60 | + - PhpCsFixer\Fixer\Phpdoc\PhpdocVarWithoutNameFixer |
| 61 | + - PhpCsFixer\Fixer\Operator\PreIncrementFixer |
| 62 | + PhpCsFixer\Fixer\FunctionNotation\ReturnTypeDeclarationFixer: |
| 63 | + space_before: none |
| 64 | + |
| 65 | + - PhpCsFixer\Fixer\ClassNotation\SelfAccessorFixer |
| 66 | + - PhpCsFixer\Fixer\CastNotation\ShortScalarCastFixer |
| 67 | + - PhpCsFixer\Fixer\StringNotation\SingleQuoteFixer |
| 68 | + - PhpCsFixer\Fixer\Semicolon\SpaceAfterSemicolonFixer |
| 69 | + - PhpCsFixer\Fixer\Operator\StandardizeNotEqualsFixer |
| 70 | + - PhpCsFixer\Fixer\Operator\TernaryOperatorSpacesFixer |
| 71 | + - PhpCsFixer\Fixer\ArrayNotation\TrimArraySpacesFixer |
| 72 | + - PhpCsFixer\Fixer\ArrayNotation\WhitespaceAfterCommaInArrayFixer |
| 73 | + PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer: |
| 74 | + singleLine: true |
| 75 | + - PhpCsFixer\Fixer\Casing\MagicConstantCasingFixer |
| 76 | + - PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer |
| 77 | + PhpCsFixer\Fixer\Alias\NoMixedEchoPrintFixer: |
| 78 | + use: echo |
| 79 | + - PhpCsFixer\Fixer\PhpUnit\PhpUnitFqcnAnnotationFixer |
| 80 | + - PhpCsFixer\Fixer\Phpdoc\PhpdocNoAliasTagFixer |
| 81 | + - PhpCsFixer\Fixer\ClassNotation\ProtectedToPrivateFixer |
| 82 | + - PhpCsFixer\Fixer\NamespaceNotation\SingleBlankLineBeforeNamespaceFixer |
| 83 | + - PhpCsFixer\Fixer\ClassNotation\SingleClassElementPerStatementFixer |
| 84 | + |
| 85 | + # new since PHP-CS-Fixer 2.6 |
| 86 | + - PhpCsFixer\Fixer\ControlStructure\NoUnneededCurlyBracesFixer |
| 87 | + - PhpCsFixer\Fixer\ClassNotation\NoUnneededFinalMethodFixer |
| 88 | + - PhpCsFixer\Fixer\Semicolon\SemicolonAfterInstructionFixer |
| 89 | + - PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer |
| 90 | + |
| 91 | + |
| 92 | + PhpCsFixer\Fixer\Alias\RandomApiMigrationFixer: |
| 93 | + mt_rand: random_int |
| 94 | + rand: random_int |
| 95 | + |
| 96 | + # declare(strict_types=1) |
| 97 | + - PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer |
| 98 | + |
| 99 | + # Typehints |
| 100 | + - PhpCsFixer\Fixer\FunctionNotation\FunctionTypehintSpaceFixer |
| 101 | + - PhpCsFixer\Fixer\FunctionNotation\ReturnTypeDeclarationFixer |
| 102 | + SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff: |
| 103 | + usefulAnnotations: |
| 104 | + - @todo |
| 105 | + - @dataProvider |
| 106 | + enableEachParameterAndReturnInspection: true |
| 107 | + |
| 108 | + # Throwable |
| 109 | + - SlevomatCodingStandard\Sniffs\Exceptions\ReferenceThrowableOnlySniff |
| 110 | + |
| 111 | + PhpCsFixer\Fixer\Comment\HeaderCommentFixer: |
| 112 | + header: |
| 113 | + """ |
| 114 | + Created by solutionDrive GmbH |
| 115 | +
|
| 116 | + @copyright 2018 solutionDrive GmbH |
| 117 | + """ |
| 118 | + location: after_declare_strict |
| 119 | + |
| 120 | +## some further sniffs, let's discuss them |
| 121 | +# # force blank line after <?php |
| 122 | +# - PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer |
| 123 | +# # force blank line before break, return, throw, ... |
| 124 | +# - PhpCsFixer\Fixer\Whitespace\BlankLineBeforeStatementFixer |
| 125 | +# # fix spaces around => and = |
| 126 | +# PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer: |
| 127 | +# align_double_arrow: true |
| 128 | +# align_equals: true |
| 129 | + |
| 130 | + |
| 131 | +parameters: |
| 132 | + skip_codes: |
| 133 | + SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff.UselessDocComment: |
| 134 | + - *tests/* |
| 135 | + PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\ControlStructureSpacingSniff.NoLineAfterClose: |
| 136 | + - * |
| 137 | + |
| 138 | + |
| 139 | +## usage example: |
| 140 | +#parameters: |
| 141 | +# skip: |
| 142 | +# PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\ControlStructureSpacingSniff: |
| 143 | +# - src/Kernel.php |
0 commit comments