-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrules.php
More file actions
57 lines (55 loc) · 1.99 KB
/
rules.php
File metadata and controls
57 lines (55 loc) · 1.99 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php declare(strict_types=1);
use NunoMaduro\PhpInsights\Domain\Insights\CyclomaticComplexityIsHigh;
use NunoMaduro\PhpInsights\Domain\Insights\ForbiddenNormalClasses;
use NunoMaduro\PhpInsights\Domain\Sniffs\ForbiddenSetterSniff;
use PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff;
use PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer;
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
use SlevomatCodingStandard\Sniffs\Classes\SuperfluousExceptionNamingSniff;
use SlevomatCodingStandard\Sniffs\Classes\SuperfluousInterfaceNamingSniff;
use SlevomatCodingStandard\Sniffs\TypeHints\DeclareStrictTypesSniff;
use SlevomatCodingStandard\Sniffs\TypeHints\ParameterTypeHintSniff;
use SlevomatCodingStandard\Sniffs\TypeHints\PropertyTypeHintSniff;
use SlevomatCodingStandard\Sniffs\TypeHints\ReturnTypeHintSniff;
return [
'preset' => 'laravel',
'remove' => [
ParameterTypeHintSniff::class,
ReturnTypeHintSniff::class,
PropertyTypeHintSniff::class,
SuperfluousExceptionNamingSniff::class,
SuperfluousInterfaceNamingSniff::class,
ForbiddenSetterSniff::class,
ForbiddenNormalClasses::class,
OrderedImportsFixer::class
],
'config' => [
DeclareStrictTypesSniff::class => [
'declareOnFirstLine' => true
],
CyclomaticComplexityIsHigh::class => [
'maxComplexity' => 10
],
LineLengthSniff::class => [
'lineLimit' => 100,
'absoluteLineLimit' => 120
],
OrderedClassElementsFixer::class => [
'order' => [
'use_trait',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'destruct',
]
]
],
'exclude' => [
'*0000_00_00*.php',
'EditoraServiceProvider.php'
]
];