-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.phpcs.xml
39 lines (34 loc) · 1.7 KB
/
.phpcs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0"?>
<ruleset name="Laravel Coding Standard" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>Custom PHPCS configuration to mimic Laravel coding standards</description>
<!-- Directorios a incluir -->
<file>app</file>
<file>config</file>
<file>database</file>
<file>resources</file>
<file>routes</file>
<file>tests</file>
<!-- Excluir ciertos archivos y patrones -->
<exclude-pattern>*/tests/Core/*/*\.(inc|css|js)$</exclude-pattern>
<exclude-pattern>*/tests/Core/*/Fixtures/*\.php$</exclude-pattern>
<!-- Incluir reglas PSR-12 -->
<rule ref="PSR12">
<!-- Excluir reglas específicas de PSR-12 -->
<exclude name="PSR12.Operators.OperatorSpacing.NoSpaceBefore"/>
<exclude name="PSR12.Operators.OperatorSpacing.NoSpaceAfter"/>
</rule>
<!-- Reglas adicionales para coincidir con los estándares de Laravel -->
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
<rule ref="Generic.Formatting.SpaceAfterNot"/>
<rule ref="Generic.WhiteSpace.ScopeIndent"/>
<rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
<rule ref="PSR2.ControlStructures.ControlStructureSpacing"/>
<rule ref="Squiz.Strings.DoubleQuoteUsage.NotRequired"/>
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration"/>
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
<!-- Excluir la regla de camelCase en la carpeta tests -->
<rule ref="PSR1.Methods.CamelCapsMethodName">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
</ruleset>