-
Notifications
You must be signed in to change notification settings - Fork 0
/
fub-standard.ini
110 lines (87 loc) · 3.09 KB
/
fub-standard.ini
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
;
; Standard for Lithium (http://lithify.me)
; Standard for FUB
; Changes from Lithium default:
; - indentation "\t" -> " " (hard tabs to soft tabs)
;
[PHPca]
line_endings = "\n"
indentation = " "
extensions = php
skip = /*.txt.php, /*.html.php, /*.xml.php, /*.json.php, /*app/resources/*, /*api-documentation/defs/*, /*api-documentation/*, /*api-documentation/elements/*, /*fub-phpca/rules/testdata/*
additional_rules = rules
; Commenting
[DocblocksMustBeLeftAlignedRule]
; File
[NoCarriageReturnsRule]
;[NoEolAtEofRule]
[NoTrailingWhitespaceRule]
; With multibyte enabled here, requires to have
; either the `intl` or `mbstring` extension installed.
[MaximumLineLengthRule]
line_length = 122
multibyte = true
;[NotExecutableRule]
; PHP tags
[OpenTagAtBeginningRule]
; Importing and Dependencies
[IncludeAndRequireWithoutBracketsRule]
[UseNoLeadingBackslashRule]
; Identifiers
[ConstantsAreUppercaseRule]
[KeywordsAreLowercaseRule]
; Types
[NoWhitespaceWithinCastsRule]
[OneSpaceAfterCastsRule]
;[NoTrailingCommaInArrayRule]
; Control Structures
[ControlStructuresSpacingRule]
;[ControlStructuresBracesRule]
; [SwitchBlockIndentationRule]
; Classes
[NoVarKeywordsRule]
[EmptyLineBeforeCloseTagRule]
; [MethodsMustHaveVisibilityOperatorRule]
; Documentation
[FunctionParametersMustBeDocumentedRule]
;[DocBlockTagsOrderRule]
order=link,see,param,return
; [FunctionsMustHaveDocBlockRule]
; Considered bad practice
[NoEvalStatementsRule]
skip=extensions/command/Misc.php, extensions/command/Leads.php, extensions/command/SimulateImap.php
[NoGlobalStatementsRule]
[NoGotoStatementsRule]
; Aliases
;[NoShortTypeNamesRule]
; Echoing
[NoPrintStatementsRule]
;[NoAlternativeSyntaxStatementsRule]
;[NoVarDumpStatementsRule]
; [NoEchoStatementsRule]
; [NoInlineHtmlRule]
; ======================================================================
; Rules we previously had enabled, but are now disabled because:
; - we want to move toward PSR-2, and the rule conflicts with that
; - PHPca is 9 years old, and doesn't correctly parse all PHP 7 features
; ======================================================================
; NOTE: declare(strict_types=1); and a few other directives need to
; precede the namespace, so this rule is not useful on our codebase.
; [NamespaceComesAfterOpeningAndNewlineRule]
; NOTE: declare(strict_types=1); is written without spaces according to
; https://github.com/php-fig/fig-standards/blob/master/proposed/extended-coding-style-guide.md
; [OperatorsSurroundedBySpacesRule]
; NOTE: The following rules cause false positives whenever
; "SomeObject::class" syntax is used in a source file.
; [OneClassPerFileRule]
; [NoEmptyLineBeforeClassCloseRule]
; [SingleEmptyLineMustFollowClassDefinitionRule]
; [ClassesMustHaveDocBlockRule]
; NOTE: PHPca incorrectly flags imported functions as not used
; [DependencyIsUsedRule]
; NOTE: Not PSR-2.
; [CloseTagAtEndRule]
; NOTE: the shut up operator is sometimes required to turn off PHP notices
; which are propertly handled by a try/catch or other means. This is not
; something a modern PHP developer needs to be warning about by the linter.
; [NoShutupOperatorsRule]