File tree 4 files changed +18
-1
lines changed
tests/Integration/Fixtures
4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 5
5
use Symplify \CodingStandard \Fixer \LineLength \LineLengthFixer ;
6
6
use Symplify \EasyCodingStandard \Config \ECSConfig ;
7
7
8
- /**
8
+ /*
9
9
* Internal rules configuration for the lmc/coding-standard project itself
10
10
*/
11
11
return ECSConfig::configure ()
Original file line number Diff line number Diff line change 106
106
use PhpCsFixer \Fixer \Phpdoc \PhpdocReturnSelfReferenceFixer ;
107
107
use PhpCsFixer \Fixer \Phpdoc \PhpdocScalarFixer ;
108
108
use PhpCsFixer \Fixer \Phpdoc \PhpdocSingleLineVarSpacingFixer ;
109
+ use PhpCsFixer \Fixer \Phpdoc \PhpdocToCommentFixer ;
109
110
use PhpCsFixer \Fixer \Phpdoc \PhpdocTrimFixer ;
110
111
use PhpCsFixer \Fixer \Phpdoc \PhpdocTypesFixer ;
111
112
use PhpCsFixer \Fixer \Phpdoc \PhpdocVarAnnotationCorrectOrderFixer ;
331
332
PhpdocSingleLineVarSpacingFixer::class,
332
333
// PHPDoc should start and end with content
333
334
PhpdocTrimFixer::class,
335
+ // Docblocks should only be used on structural elements.
336
+ PhpdocToCommentFixer::class,
334
337
// The correct case must be used for standard PHP types in PHPDoc.
335
338
PhpdocTypesFixer::class,
336
339
// `@var` and `@type` annotations must have type and name in the correct order
Original file line number Diff line number Diff line change @@ -24,6 +24,13 @@ class Basic
24
24
25
25
public function fooBar (mixed $ foo ): mixed
26
26
{
27
+ // PhpdocToCommentFixer
28
+ /*
29
+ * Phpdoc used instead of plain comment
30
+ */
31
+ if ($ foo === 'bar ' ) {
32
+ $ baz = 'bat ' ;
33
+ }
27
34
// TernaryToElvisOperatorFixer
28
35
return ($ foo ?: 'not true ' );
29
36
}
Original file line number Diff line number Diff line change @@ -20,6 +20,13 @@ class Basic
20
20
21
21
public function fooBar (mixed $ foo ): mixed
22
22
{
23
+ // PhpdocToCommentFixer
24
+ /**
25
+ * Phpdoc used instead of plain comment
26
+ */
27
+ if ($ foo === 'bar ' ) {
28
+ $ baz = 'bat ' ;
29
+ }
23
30
// TernaryToElvisOperatorFixer
24
31
return ($ foo ? $ foo : 'not true ' );
25
32
}
You can’t perform that action at this time.
0 commit comments