Skip to content

Commit 3871c8b

Browse files
committed
init
1 parent 8499bbf commit 3871c8b

4 files changed

Lines changed: 328 additions & 0 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.gitignore
2+
.idea/
3+
vendor/

composer.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "spameri/coding-standard",
3+
"require": {
4+
"squizlabs/php_codesniffer": "^3.4",
5+
"slevomat/coding-standard": "^5.0",
6+
"escapestudios/symfony2-coding-standard": "^3.5"
7+
},
8+
"authors": [
9+
{
10+
"name": "VBoss",
11+
"email": "vcevela@gmail.com"
12+
}
13+
]
14+
}

composer.lock

Lines changed: 208 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ruleset.xml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<?xml version="1.0" ?>
2+
<ruleset name="Spameri">
3+
4+
<config name="installed_paths" value="../slevomat/coding-standard,../escapestudios/symfony2-coding-standard"/>
5+
6+
<!-- Arrays -->
7+
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
8+
9+
<!-- Classes -->
10+
<rule ref="Generic.Classes.DuplicateClassName"/>
11+
<rule ref="Squiz.Classes.LowercaseClassKeywords"/>
12+
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
13+
<rule ref="SlevomatCodingStandard.Classes.UnusedPrivateElements"/>
14+
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/>
15+
<rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces"/>
16+
17+
<!-- Exceptions -->
18+
<rule ref="SlevomatCodingStandard.Exceptions.DeadCatch"/>
19+
<rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly"/>
20+
21+
<!-- Files -->
22+
<rule ref="Generic.Files.ByteOrderMark"/>
23+
<rule ref="Generic.Files.LineEndings"/>
24+
<rule ref="PSR2.Files.EndFileNewline"/>
25+
<rule ref="Zend.Files.ClosingTag"/>
26+
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName"/>
27+
28+
<!-- Functions -->
29+
<rule ref="Squiz.Functions.LowercaseFunctionKeywords"/>
30+
<rule ref="SlevomatCodingStandard.Functions.StaticClosure"/>
31+
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure"/>
32+
<rule ref="SlevomatCodingStandard.Functions.UnusedParameter"/>
33+
<rule ref="SlevomatCodingStandard.Functions.UselessParameterDefaultValue"/>
34+
<rule ref="SlevomatCodingStandard.Functions.TrailingCommaInCall"/>
35+
36+
<!-- Namespaces -->
37+
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
38+
<properties>
39+
<property name="searchAnnotations" value="1"/>
40+
</properties>
41+
</rule>
42+
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/>
43+
<rule ref="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces"/>
44+
<rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants"/>
45+
<rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions"/>
46+
<rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions"/>
47+
<rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation"/>
48+
49+
<!-- NamingConventions -->
50+
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
51+
<rule ref="Generic.NamingConventions.CamelCapsFunctionName">
52+
<properties>
53+
<property name="strict" value="0"/>
54+
</properties>
55+
</rule>
56+
57+
<!-- PHP -->
58+
<rule ref="Generic.PHP.DeprecatedFunctions"/>
59+
<rule ref="Generic.PHP.ForbiddenFunctions"/>
60+
<rule ref="Generic.PHP.UpperCaseConstant"/>
61+
<rule ref="SlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking"/>
62+
63+
<!-- NewLines -->
64+
<rule ref="Symfony.Formatting.BlankLineBeforeReturn"/>
65+
66+
<!-- WhiteSpace -->
67+
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
68+
<rule ref="Squiz.ControlStructures.ControlSignature"/>
69+
<rule ref="Generic.Formatting.SpaceAfterCast"/>
70+
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
71+
72+
<!-- Control structures -->
73+
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
74+
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/>
75+
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowEmpty"/>
76+
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
77+
<rule ref="SlevomatCodingStandard.ControlStructures.ControlStructureSpacing"/>
78+
79+
<!-- TypeHints -->
80+
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"/>
81+
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration"/>
82+
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"/>
83+
<rule ref="SlevomatCodingStandard.TypeHints.DisallowArrayTypeHintSyntax"/>
84+
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing">
85+
<properties>
86+
<property name="spacesCountBeforeColon" value="1"/>
87+
</properties>
88+
</rule>
89+
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
90+
91+
<!-- Operators -->
92+
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
93+
<rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>
94+
95+
<!-- Variables -->
96+
<rule ref="SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable"/>
97+
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable"/>
98+
<rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
99+
100+
<!-- Commenting -->
101+
<rule ref="SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment"/>
102+
103+
</ruleset>

0 commit comments

Comments
 (0)