You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Adjust the configuration according to your needs.
34
-
};
34
+
;
35
35
```
36
36
37
37
Then run the script like this:
38
38
39
+
```bash
40
+
vendor/bin/ecs check
39
41
```
40
-
vendor/bin/ecs check src tests
41
-
```
42
+
43
+
## What's inside?
44
+
45
+
The package contains the following custom fixers:
46
+
47
+
| Class | Description |
48
+
| --- | --- |
49
+
|[`AssertEqualsFixer`](src/Fixer/AssertEqualsFixer.php)| Replaces `asserEquals()` with `assertSame()` in unit tests unless the method is used to compare two objects. |
50
+
|[`CaseCommentIndentationFixer`](src/Fixer/CaseCommentIndentationFixer.php)| Fixes the comment indentation before a `case` statement. |
51
+
|[`ChainedMethodBlockFixer`](src/Fixer/ChainedMethodBlockFixer.php)| Adds an empty line after a block of chained method calls. |
52
+
|[`CommentLengthFixer`](src/Fixer/CommentLengthFixer.php)| Adjusts the length of comments regardless of their indentation so that each line is about 80 characters long. |
53
+
|[`ExpectsWithCallbackFixer`](src/Fixer/ExpectsWithCallbackFixer.php)| Adjusts the indentation of `$this->callback()` calls inside the `with()` method of a unit test. |
54
+
|[`FindByPkFixer`](src/Fixer/FindByPkFixer.php)| Replaces `findByPk()` calls with `findById()`. |
55
+
|[`FunctionCallWithMultilineArrayFixer`](src/Fixer/FunctionCallWithMultilineArrayFixer.php)| Fixes the indentation of function calls with multi-line array arguments. |
56
+
|[`InlinePhpdocCommentFixer`](src/Fixer/InlinePhpdocCommentFixer.php)| Ensures that inline phpDoc comments are not converted to regular comments. |
57
+
|[`IsArrayNotEmptyFixer`](src/Fixer/IsArrayNotEmptyFixer.php)| Fixes the order of `isset()` and `empty()` calls in conjunction with `is_array()` checks. |
58
+
|[`MockMethodChainingIndentationFixer`](src/Fixer/MockMethodChainingIndentationFixer.php)| Fixes the indentation of chained mock methods. |
59
+
|[`MultiLineIfIndentationFixer`](src/Fixer/MultiLineIfIndentationFixer.php)| Fixes the indentation of multi-line if statements. |
60
+
|[`MultiLineLambdaFunctionArgumentsFixer`](src/Fixer/MultiLineLambdaFunctionArgumentsFixer.php)| Fixes the indentation of multi-line lambda function arguments. |
61
+
|[`NoExpectsThisAnyFixer`](src/Fixer/NoExpectsThisAnyFixer.php)| Removes the explicit `any()` assertion in unit tests. |
62
+
|[`NoLineBreakBetweenMethodArgumentsFixer`](src/Fixer/NoLineBreakBetweenMethodArgumentsFixer.php)| Fixes the indentation of method declarations. |
63
+
|[`NoSemicolonAfterShortEchoTagFixer`](src/Fixer/NoSemicolonAfterShortEchoTagFixer.php)| Removes the semicolon after short echo tag instructions. |
64
+
|[`SingleLineConfigureCommandFixer`](src/Fixer/SingleLineConfigureCommandFixer.php)| Fixes the indentation of Symfony command arguments and options. |
65
+
|[`TypeHintOrderFixer`](src/Fixer/TypeHintOrderFixer.php)| Fixes the type hint order in method declarations. |
66
+
67
+
The package contains the following custom sniffs:
68
+
69
+
| Class | Description |
70
+
| --- | --- |
71
+
|[`ContaoFrameworkClassAliasSniff`](src/Sniffs/ContaoFrameworkClassAliasSniff.php)| Prevents using aliased Contao classes instead of their originals. |
72
+
|[`SetDefinitionCommandSniff`](src/Sniffs/SetDefinitionCommandSniff.php)| Prevents using the `setDefinition()` method in Symfony commands. |
73
+
|[`UseSprintfInExceptionsSniff`](src/Sniffs/UseSprintfInExceptionsSniff.php)| Prevents using string interpolation in exception messages. |
42
74
43
75
## License
44
76
@@ -50,4 +82,4 @@ Visit the [support page][3] to learn about the available support options.
0 commit comments