Skip to content

Commit

Permalink
Add missed stub file
Browse files Browse the repository at this point in the history
  • Loading branch information
oanhnn committed Jan 30, 2023
1 parent 16a8524 commit ea307b1
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions stub/laravel/phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"
name="Rabiloo"
>
<description>Rabiloo's PHP coding standard</description>

<!-- display progress -->
<arg value="p"/>

<!-- Show sniff codes in all reports -->
<arg value= "s"/>

<!-- use colors in output -->
<arg name="colors"/>

<!-- Paths to check -->
<file>app</file>
<file>bootstrap</file>
<file>config</file>
<file>database</file>
<file>lang</file>
<file>public</file>
<file>routes</file>
<file>tests</file>

<exclude-pattern>*/*.js</exclude-pattern>
<exclude-pattern>*/*.css</exclude-pattern>
<exclude-pattern>*/*.xml</exclude-pattern>
<exclude-pattern>*/*.blade.php</exclude-pattern>
<exclude-pattern>bootstrap/cache</exclude-pattern>

<rule ref="vendor/rabiloo/coding-standard/ruleset.xml"/>

<!-- Exclude some PHP files, it haven't class definitions -->
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>database/migrations/*</exclude-pattern>
</rule>

<!-- Exclude test classes, it can have not CamelCapsMethodName -->
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<exclude-pattern>tests/*/*Test.php</exclude-pattern>
</rule>

<!-- Exclude some PHP config files -->
<rule ref="PSR1.Files.SideEffects">
<exclude-pattern>bootstrap/*</exclude-pattern>
<exclude-pattern>config/*</exclude-pattern>
<exclude-pattern>lang/*</exclude-pattern>
<exclude-pattern>public/*</exclude-pattern>
<exclude-pattern>routes/*</exclude-pattern>
</rule>
</ruleset>

0 comments on commit ea307b1

Please sign in to comment.