Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions docs/rules.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@

The DanielEScherzer standard contains 159 sniffs
The DanielEScherzer standard contains 166 sniffs

CommonPhpcs (1 sniff)
---------------------
CommonPhpcs.Attributes.AttributeAlignment

Generic (41 sniffs)
Generic (43 sniffs)
-------------------
Generic.Arrays.DisallowLongArraySyntax
Generic.Classes.DuplicateClassName
Generic.CodeAnalysis.AssignmentInCondition
Generic.CodeAnalysis.EmptyPHPStatement
Generic.CodeAnalysis.EmptyStatement
Generic.CodeAnalysis.ForLoopShouldBeWhileLoop
Generic.CodeAnalysis.JumbledIncrementer
Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence
Expand All @@ -19,6 +20,7 @@ Generic (41 sniffs)
Generic.ControlStructures.DisallowYodaConditions
Generic.ControlStructures.InlineControlStructure
Generic.Files.ByteOrderMark
Generic.Files.InlineHTML
Generic.Files.LineEndings
Generic.Files.LineLength
Generic.Files.OneObjectStructurePerFile
Expand Down Expand Up @@ -114,6 +116,10 @@ PEAR (1 sniff)
--------------
PEAR.Functions.ValidDefaultValue

PSR1 (1 sniff)
--------------
PSR1.Files.SideEffects

PSR2 (9 sniffs)
---------------
PSR2.Classes.ClassDeclaration
Expand All @@ -126,8 +132,9 @@ PSR2 (9 sniffs)
PSR2.Namespaces.NamespaceDeclaration
PSR2.Namespaces.UseDeclaration

PSR12 (6 sniffs)
PSR12 (7 sniffs)
----------------
PSR12.Classes.ClassInstantiation
PSR12.Files.ImportStatement
PSR12.Functions.NullableTypeDeclaration
PSR12.Functions.ReturnTypeDeclaration
Expand Down Expand Up @@ -172,13 +179,16 @@ Squiz (22 sniffs)
Squiz.WhiteSpace.SemicolonSpacing
Squiz.WhiteSpace.SuperfluousWhitespace

Universal (11 sniffs)
Universal (14 sniffs)
---------------------
Universal.CodeAnalysis.NoDoubleNegative
Universal.Constants.LowercaseClassResolutionKeyword
Universal.Constants.UppercaseMagicConstants
Universal.ControlStructures.DisallowAlternativeSyntax
Universal.Lists.DisallowLongListSyntax
Universal.NamingConventions.NoReservedKeywordParameterNames
Universal.Operators.DisallowLogicalAndOr
Universal.Operators.StrictComparisons
Universal.Operators.TypeSeparatorSpacing
Universal.PHP.LowercasePHPTag
Universal.UseStatements.KeywordSpacing
Expand Down
2 changes: 2 additions & 0 deletions src/Tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
declare( strict_types = 1 );

// phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols

require_once __DIR__ . '/../../vendor/autoload.php';

// For some reason the classes from codesniffer need to be loaded separately
Expand Down
9 changes: 9 additions & 0 deletions src/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,16 @@
</rule>

<!-- Some extra rules that seem useful from PHPCS core -->
<rule ref="Generic.CodeAnalysis.EmptyStatement" />
<rule ref="Generic.Files.InlineHTML" />
<rule ref="Generic.PHP.DeprecatedFunctions" />
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols" />
<rule ref="PSR12.Classes.ClassInstantiation.MissingParentheses" />

<!-- phpcsstandards/phpcsextra rules -->
<rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames" />
<rule ref="Universal.Operators.DisallowLogicalAndOr" />
<rule ref="Universal.Operators.StrictComparisons" />

<!-- SlevomatCodingStandard rules -->
<rule ref="SlevomatCodingStandard.Attributes.AttributesOrder">
Expand Down