Download the PHP package mikulas/code-sniffs without Composer
On this page you can find all versions of the php package mikulas/code-sniffs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mikulas/code-sniffs
More information about mikulas/code-sniffs
Files in mikulas/code-sniffs
Package code-sniffs
Short Description Code sniffer rules for Clevis coding standard
License MIT
Informations about the package code-sniffs
Custom CodeSniffer rules
Annotations
ForceMultipleLinesSniff
Warn if phpdoc is single line (unless its on variable)
Disallowed:
Allowed:
NullFirstSniff
Disallowed:
Allowed:
SeparateInjectSniff
@inject
must not be on same line as @var
.
ControlStructures
SeparateBracketsSniff
force newline before opening curly bracket of if
, else
, elseif
, foreach
and for
blocks:
Debug
ClassDebuggerCallSniff
Warn if methods dump
, barDump
, firelog
or timer
are called on Debugger
class.
DebugFunctionCallSniff
Warn if function d
, dd
, de
, dump
, var_dump
, error_log
, or print_r
is called.
Formatting
UseInAlphabeticalOrderSniff
UseWithoutStartingSeparator
Warn on use \Foo\Bar;
, suggest use Foo\Bar
instead.
MVC
AbstractOrFinalPresenterSniff
Nette Presenter classes must be either abstract or final.
Namespaces
UseDeclarationSniff
Use declarations must be right after namespace declaration, separated by exactly one empty line. There must be exactly one use per declaration. There must be exactly two empty lines after last use declaration.
Newlines
NamespaceNewlinesSniff
Namespace declaration must be directly under php opening tag, separated by exactly one empty line. There must be exactly one empty line between namespace declaration and first use declaration. If no use declaration follows, there must be two lines after namespace declaration.
UseNewlinesSniff
Use declarations must have no empty newlines in between.
PHP
KeywordCaseSniff
Checks that all constructs but logical operators are lowercase.
(e.g.: foreach
instead of ForEach
)
UpperCaseBooleanConstantSniff UpperCaseNullConstantSniff
Strings
ConcatenationSpacingSniff
Concatenation operator (.
) must be separated by exacly one
space on both sides.
Variables
VariableNameSniff
Enforce camelCase and deny leading underscore.
WhiteSpace
CommaSpacingSniff
Ensures there is no whitespaces before and exactly one space after each comma.
ListSpacingSniff
Disallows:
Allows