Skip to content

Commit d752a57

Browse files
✨ Check phpdoc indent
1 parent b1d2f55 commit d752a57

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

SymfonyCustom/Tests/Commenting/VariableCommentUnitTest.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class VariableCommentUnitTest
120120
*
121121
*
122122
*/
123-
public $emptyVarDoc = '';
123+
public $emptyVarDoc = '';
124124
/**
125125
* @var int
126126
*/

SymfonyCustom/Tests/Commenting/VariableCommentUnitTest.inc.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class VariableCommentUnitTest
120120
*
121121
*
122122
*/
123-
public $emptyVarDoc = '';
123+
public $emptyVarDoc = '';
124124

125125
/**
126126
* @var int

SymfonyCustom/ruleset.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
<!-- We should only be concerned by src and tests folder -->
77
<exclude-pattern>*/app/*</exclude-pattern>
8+
<exclude-pattern>*/bin/*</exclude-pattern>
89
<exclude-pattern>*/var/*</exclude-pattern>
910
<exclude-pattern>*/vendor/*</exclude-pattern>
1011
<exclude-pattern>*/web/*</exclude-pattern>
@@ -31,6 +32,15 @@
3132
<severity>5</severity>
3233
</rule>
3334

35+
<!-- Override ScopeIndent to check phpDoc comments indent-->
36+
<rule ref="Generic.WhiteSpace.ScopeIndent">
37+
<properties>
38+
<property name="ignoreIndentationTokens" type="array">
39+
<element value="T_COMMENT"/>
40+
</property>
41+
</properties>
42+
</rule>
43+
3444
<!-- **************** -->
3545
<!-- *** OTHERS *** -->
3646
<!-- **************** -->

docs/standards.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ We imported the [PSR2 Standard](./standards/psr2.md) with these overrides:
2121
</rule>
2222
```
2323

24+
- PhpDoc comments MUSE use an indent of 4 spaces, and MUST NOT use tabs for indenting.
25+
```
26+
<rule ref="Generic.WhiteSpace.ScopeIndent">
27+
<properties>
28+
<property name="ignoreIndentationTokens" type="array">
29+
<element value="T_COMMENT"/>
30+
</property>
31+
</properties>
32+
</rule>
33+
```
34+
2435
## From symfony
2536

2637
We mainly respect the [Symfony Standard](./standards/symfony.md) but

0 commit comments

Comments
 (0)