|
1 | 1 | <?xml version="1.0"?>
|
2 |
| -<ruleset name="Laravel Standards"> |
| 2 | +<ruleset name="Laravel Standards" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"> |
3 | 3 | <description>PHP Codesniffer ruleset to follow Laravel's coding style</description>
|
4 | 4 | <rule ref="Generic.Classes.DuplicateClassName">
|
5 | 5 | <exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIf"/>
|
|
137 | 137 | <rule ref="Squiz.Strings.DoubleQuoteUsage.NotRequired"/>
|
138 | 138 | <rule ref="Zend.Files.ClosingTag"/>
|
139 | 139 |
|
| 140 | + <!-- Custom Sniffs --> |
| 141 | + <rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"> |
| 142 | + <properties> |
| 143 | + <property name="searchAnnotations" value="true"/> |
| 144 | + </properties> |
| 145 | + </rule> |
| 146 | + <rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/> |
| 147 | + <rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"> |
| 148 | + <properties> |
| 149 | + <property name="caseSensitive" value="true"/> |
| 150 | + </properties> |
| 151 | + </rule> |
| 152 | + <rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation"/> |
| 153 | + <rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/> |
| 154 | + <rule ref="SlevomatCodingStandard.Classes.MethodSpacing"> |
| 155 | + <properties> |
| 156 | + <property name="minLinesCount" value="1"/> |
| 157 | + <property name="maxLinesCount" value="1"/> |
| 158 | + </properties> |
| 159 | + </rule> |
| 160 | + <rule ref="SlevomatCodingStandard.Functions.ArrowFunctionDeclaration"> |
| 161 | + <properties> |
| 162 | + <property name="spacesCountAfterKeyword" value="1"/> |
| 163 | + <property name="spacesCountBeforeArrow" value="1"/> |
| 164 | + <property name="spacesCountAfterArrow" value="1"/> |
| 165 | + <property name="allowMultiLine" value="true"/> |
| 166 | + </properties> |
| 167 | + </rule> |
| 168 | + <rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName"> |
| 169 | + <properties> |
| 170 | + <property name="rootNamespaces" type="array"> |
| 171 | + <element key="app" value="App"/> |
| 172 | + <element key="database/factories" value="Database\Factories"/> |
| 173 | + <element key="database/seeders" value="Database\Seeders"/> |
| 174 | + <element key="tests" value="Tests"/> |
| 175 | + </property> |
| 176 | + </properties> |
| 177 | + </rule> |
| 178 | + <rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName"> |
| 179 | + <exclude-pattern>/database/schema/*</exclude-pattern> |
| 180 | + <exclude-pattern>/database/migrations/*</exclude-pattern> |
| 181 | + </rule> |
| 182 | + |
140 | 183 | <!-- <file>app</file>
|
141 | 184 | <file>config</file>
|
142 | 185 | <file>public</file>
|
|
0 commit comments