-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathphpinsights.php
89 lines (79 loc) · 3.25 KB
/
phpinsights.php
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
use NunoMaduro\PhpInsights\Domain\Insights\CyclomaticComplexityIsHigh;
use NunoMaduro\PhpInsights\Domain\Insights\ForbiddenNormalClasses;
use NunoMaduro\PhpInsights\Domain\Insights\ForbiddenTraits;
use NunoMaduro\PhpInsights\Domain\Sniffs\ForbiddenSetterSniff;
use ObjectCalisthenics\Sniffs\Classes\ForbiddenPublicPropertySniff;
use ObjectCalisthenics\Sniffs\Files\ClassTraitAndInterfaceLengthSniff;
use ObjectCalisthenics\Sniffs\Files\FunctionLengthSniff;
use ObjectCalisthenics\Sniffs\Metrics\MethodPerClassLimitSniff;
use PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\UselessOverridingMethodSniff;
use PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\TodoSniff;
use PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff;
use SlevomatCodingStandard\Sniffs\Classes\SuperfluousExceptionNamingSniff;
use SlevomatCodingStandard\Sniffs\Commenting\DocCommentSpacingSniff;
use SlevomatCodingStandard\Sniffs\ControlStructures\DisallowEmptySniff;
use SlevomatCodingStandard\Sniffs\Namespaces\AlphabeticallySortedUsesSniff;
use SlevomatCodingStandard\Sniffs\TypeHints\DeclareStrictTypesSniff;
use SlevomatCodingStandard\Sniffs\TypeHints\DisallowArrayTypeHintSyntaxSniff;
use SlevomatCodingStandard\Sniffs\TypeHints\DisallowMixedTypeHintSniff;
return [
/*
|--------------------------------------------------------------------------
| Default Preset
|--------------------------------------------------------------------------
|
| This option controls the default preset that will be used by PHP Insights
| to make your code reliable, simple, and clean. However, you can always
| adjust the `Metrics` and `Insights` below in this configuration file.
|
| Supported: "default", "laravel", "symfony", "magento2", "drupal"
|
*/
'preset' => 'laravel',
/*
|--------------------------------------------------------------------------
| Configuration
|--------------------------------------------------------------------------
|
| Here you may adjust all the various `Insights` that will be used by PHP
| Insights. You can either add, remove or configure `Insights`. Keep in
| mind, that all added `Insights` must belong to a specific `Metric`.
|
*/
'exclude' => [
'tests/',
'phpinsights.php',
'config/',
],
'add' => [
// ExampleMetric::class => [
// ExampleInsight::class,
// ]
],
'remove' => [
DocCommentSpacingSniff::class,
AlphabeticallySortedUsesSniff::class,
LineLengthSniff::class,
FunctionLengthSniff::class,
SuperfluousExceptionNamingSniff::class,
MethodPerClassLimitSniff::class,
ClassTraitAndInterfaceLengthSniff::class,
ForbiddenNormalClasses::class,
CyclomaticComplexityIsHigh::class,
DeclareStrictTypesSniff::class,
DisallowArrayTypeHintSyntaxSniff::class,
DisallowEmptySniff::class,
DisallowMixedTypeHintSniff::class,
ForbiddenTraits::class,
ForbiddenPublicPropertySniff::class,
ForbiddenSetterSniff::class,
UselessOverridingMethodSniff::class,
TodoSniff::class,
],
'config' => [
// ExampleInsight::class => [
// 'key' => 'value',
// ],
],
];