Skip to content

Commit bbc4e28

Browse files
committed
CodeSniffer ruleset.xml
1 parent c192d3c commit bbc4e28

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

ruleset.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="RegioStandard">
3+
<description>RegioMedia PHP Coding Standard</description>
4+
5+
<!-- Основа: https://www.php-fig.org/psr/psr-2/ -->
6+
<rule ref="PSR2" />
7+
8+
<!-- Включают обязательность док-блоков для классов и функций -->
9+
<rule ref="Squiz.Commenting.FunctionComment" />
10+
<rule ref="Squiz.Commenting.FunctionCommentThrowTag" />
11+
<rule ref="Squiz.Commenting.ClassComment">
12+
<exclude name="Squiz.Commenting.ClassComment.TagNotAllowed"/>.
13+
</rule>
14+
<rule ref="Squiz.Commenting.VariableComment" />
15+
16+
<!-- увеличивает лимит на длину строки по сравнению с PSR-2 -->
17+
<rule ref="Generic.Files.LineLength">
18+
<properties>
19+
<property name="lineLimit" value="140"/>
20+
<property name="absoluteLineLimit" value="200"/>
21+
</properties>
22+
</rule>
23+
24+
<!-- предупреждает об использовании нежелательных функций (устаревшие и отладочные) -->
25+
<rule ref="Generic.PHP.ForbiddenFunctions">
26+
<properties>
27+
<property name="error" value="false" />
28+
<property name="forbiddenFunctions" type="array"
29+
value="sizeof=>count,delete=>unset,d=>null,var_dump=>null" />
30+
</properties>
31+
</rule>
32+
33+
<!-- запрещает использование двойных кавычек там, где они не нужны -->
34+
<rule ref="Squiz.Strings.DoubleQuoteUsage.NotRequired" />
35+
</ruleset>

0 commit comments

Comments
 (0)