-
Notifications
You must be signed in to change notification settings - Fork 40
/
phpcs.xml
36 lines (30 loc) · 1.57 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
<?xml version="1.0"?>
<ruleset name="PSR2-laravel">
<description>The PSR2 standard, but ignore something for laravel.</description>
<!-- use preg_match https://github.com/squizlabs/PHP_CodeSniffer/issues/742#issuecomment-215250517 -->
<exclude-pattern>/bootstrap/cache/</exclude-pattern>
<exclude-pattern>/storage/</exclude-pattern>
<exclude-pattern>/vendor/</exclude-pattern>
<exclude-pattern>/_[a-zA-Z0-9\._]+\.php</exclude-pattern>
<exclude-pattern>/\.[a-zA-Z0-9\._]+\.php</exclude-pattern>
<exclude-pattern>*\.js</exclude-pattern>
<exclude-pattern>*\.css</exclude-pattern>
<!-- Include the whole PSR12 standard -->
<rule ref="PSR12"/>
<!-- ignore WARNING: A file should declare new symbols -->
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>/bootstrap/</exclude-pattern>
</rule>
<!-- ignore ERROR: Each class must be in a namespace of at least one level (a top-level vendor name) -->
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>/database/migrations/</exclude-pattern>
<exclude-pattern>/database/seeds/</exclude-pattern>
</rule>
<rule ref="Internal.NoCodeFound">
<exclude-pattern>/resources/views/</exclude-pattern>
</rule>
<!-- ignore WARNING: A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 10 and the first side effect is on line 24. -->
<rule ref="PSR1.Files.SideEffects">
<exclude-pattern>/public/index.php</exclude-pattern>
</rule>
</ruleset>