|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +use PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\FunctionCommentSniff; |
| 6 | +use SlevomatCodingStandard\Sniffs\Namespaces\UseSpacingSniff; |
| 7 | +use Symplify\EasyCodingStandard\Config\ECSConfig; |
| 8 | + |
| 9 | +return static function (ECSConfig $ecsConfig): void { |
| 10 | + $ecsConfig->import(__DIR__ . '/vendor/brick/coding-standard/ecs.php'); |
| 11 | + |
| 12 | + $libRootPath = __DIR__ . '/../../'; |
| 13 | + |
| 14 | + $ecsConfig->paths( |
| 15 | + [ |
| 16 | + $libRootPath . '/src', |
| 17 | + $libRootPath . '/tests', |
| 18 | + __FILE__, |
| 19 | + ], |
| 20 | + ); |
| 21 | + |
| 22 | + $ecsConfig->indentation('spaces'); |
| 23 | + |
| 24 | + $ecsConfig->skip([ |
| 25 | + // Only interested in FunctionCommentSniff.ParamCommentFullStop, excludes the rest |
| 26 | + FunctionCommentSniff::class . '.Missing' => null, |
| 27 | + FunctionCommentSniff::class . '.MissingReturn' => null, |
| 28 | + FunctionCommentSniff::class . '.MissingParamTag' => null, |
| 29 | + FunctionCommentSniff::class . '.EmptyThrows' => null, |
| 30 | + FunctionCommentSniff::class . '.IncorrectParamVarName' => null, |
| 31 | + FunctionCommentSniff::class . '.IncorrectTypeHint' => null, |
| 32 | + FunctionCommentSniff::class . '.MissingParamComment' => null, |
| 33 | + FunctionCommentSniff::class . '.ParamNameNoMatch' => null, |
| 34 | + FunctionCommentSniff::class . '.InvalidReturn' => null, |
| 35 | + |
| 36 | + // Keep a line between same use types, spacing around uses is done in other fixers |
| 37 | + UseSpacingSniff::class . '.IncorrectLinesCountBeforeFirstUse' => null, |
| 38 | + UseSpacingSniff::class . '.IncorrectLinesCountAfterLastUse' => null, |
| 39 | + ]); |
| 40 | +}; |
0 commit comments