-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpinsights.php
54 lines (52 loc) · 1.92 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
<?php
declare(strict_types=1);
return [
'preset' => 'symfony',
'ide' => null,
'exclude' => [
'src/Kernel.php',
],
'add' => [
\NunoMaduro\PhpInsights\Domain\Metrics\Code\Code::class => [
\SlevomatCodingStandard\Sniffs\ControlStructures\RequireYodaComparisonSniff::class,
],
],
'remove' => [
\SlevomatCodingStandard\Sniffs\Classes\SuperfluousInterfaceNamingSniff::class,
\PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\SpaceAfterNotSniff::class,
\SlevomatCodingStandard\Sniffs\ControlStructures\DisallowYodaComparisonSniff::class,
\NunoMaduro\PhpInsights\Domain\Insights\ForbiddenTraits::class,
\NunoMaduro\PhpInsights\Domain\Insights\ForbiddenSecurityIssues::class,
\SlevomatCodingStandard\Sniffs\Classes\SuperfluousTraitNamingSniff::class,
\PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\TodoSniff::class,
],
'config' => [
\PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff::class => [
'lineLimit' => 120,
'absoluteLineLimit' => 160,
],
\PhpCsFixer\Fixer\Import\OrderedImportsFixer::class => [
'imports_order' => ['const', 'class', 'function'],
],
\SlevomatCodingStandard\Sniffs\TypeHints\DisallowMixedTypeHintSniff::class => [
'exclude' => [
'src/Parser/SlackMessageParser.php',
'src/Service/Slack/BrowseService.php',
],
],
\SlevomatCodingStandard\Sniffs\TypeHints\PropertyTypeHintSniff::class => [
'exclude' => [
'src/Command',
],
],
\ObjectCalisthenics\Sniffs\Files\FunctionLengthSniff::class => [
'maxLength' => 50,
],
],
'requirements' => [
'min-quality' => 100,
// 'min-complexity' => 0,
'min-architecture' => 100,
'min-style' => 100,
],
];