This repository has been archived by the owner on Feb 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpinsights.php
62 lines (60 loc) · 2.83 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
<?php
declare(strict_types=1);
return [
'preset' => 'default',
'exclude' => [
// 'path/to/directory-or-file'
],
'add' => [
// ExampleMetric::class => [
// ExampleInsight::class,
// ]
NunoMaduro\PhpInsights\Domain\Metrics\Code\Code::class => [
SlevomatCodingStandard\Sniffs\ControlStructures\RequireYodaComparisonSniff::class,
],
],
'remove' => [
// ExampleInsight::class,
SlevomatCodingStandard\Sniffs\ControlStructures\DisallowShortTernaryOperatorSniff::class,
SlevomatCodingStandard\Sniffs\ControlStructures\DisallowYodaComparisonSniff::class,
SlevomatCodingStandard\Sniffs\PHP\UselessParenthesesSniff::class,
SlevomatCodingStandard\Sniffs\TypeHints\DisallowArrayTypeHintSyntaxSniff::class,
SlevomatCodingStandard\Sniffs\TypeHints\UselessConstantTypeHintSniff::class,
PhpCsFixer\Fixer\ControlStructure\NoUnneededControlParenthesesFixer::class,
PhpCsFixer\Fixer\Operator\TernaryOperatorSpacesFixer::class,
PhpCsFixer\Fixer\Phpdoc\PhpdocInlineTagFixer::class,
PhpCsFixer\Fixer\Phpdoc\PhpdocSeparationFixer::class,
PhpCsFixer\Fixer\Phpdoc\AlignMultilineCommentFixer::class,
PHP_CodeSniffer\Standards\PSR2\Sniffs\ControlStructures\ElseIfDeclarationSniff::class,
PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\SpaceAfterCastSniff::class,
],
'config' => [
// ExampleInsight::class => [
// 'key' => 'value',
// ],
ObjectCalisthenics\Sniffs\NamingConventions\ElementNameMinimalLengthSniff::class => [
'minLength' => 3,
'allowedShortNames' => ['i', 'id', 'to', 'up', 'ky', 'vl', 'e'],
],
PhpCsFixer\Fixer\CastNotation\CastSpacesFixer::class => [
'space' => 'none',
],
PhpCsFixer\Fixer\Basic\BracesFixer::class => [
'allow_single_line_closure' => false,
'position_after_anonymous_constructs' => 'next',
'position_after_control_structures' => 'next',
'position_after_functions_and_oop_constructs' => 'next',
],
SlevomatCodingStandard\Sniffs\Commenting\DocCommentSpacingSniff::class => [
'linesCountBeforeFirstContent' => 0,
'linesCountBetweenDescriptionAndAnnotations' => 1,
'linesCountBetweenDifferentAnnotationsTypes' => 0,
'linesCountBetweenAnnotationsGroups' => 0,
'linesCountAfterLastContent' => 0,
'annotationsGroups' => [],
],
PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer::class => [
'tokens' => [], // possibles values ['break', 'case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block', 'return', 'square_brace_block', 'switch', 'throw', 'use', 'use_trait']
]
],
];