Coding Standard

This project is set of PhpCs fixers and PHP_Code sniffers combined under EasyCodingStandard that checks and fixes your code.
PHP 7.1
PHP 8.0

# Rules

Here is the list of rules, which we are using:

  • PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\UpperCaseConstantNameSniff
  • PHP_CodeSniffer\Standards\PSR1\Sniffs\Methods\CamelCapsMethodNameSniff
  • PhpCsFixer\Fixer\Alias\NoAliasFunctionsFixer
  • PhpCsFixer\Fixer\Alias\PowToExponentiationFixer
  • PhpCsFixer\Fixer\Alias\SetTypeToCastFixer
  • PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer
  • PhpCsFixer\Fixer\ArrayNotation\NoTrailingCommaInSinglelineArrayFixer
  • PhpCsFixer\Fixer\ArrayNotation\NoWhitespaceBeforeCommaInArrayFixer
  • PhpCsFixer\Fixer\ArrayNotation\NormalizeIndexBraceFixer
  • PhpCsFixer\Fixer\ArrayNotation\TrailingCommaInMultilineArrayFixer
  • PhpCsFixer\Fixer\ArrayNotation\TrimArraySpacesFixer
  • PhpCsFixer\Fixer\ArrayNotation\WhitespaceAfterCommaInArrayFixer
  • PhpCsFixer\Fixer\Basic\BracesFixer
  • PhpCsFixer\Fixer\Basic\EncodingFixer
  • PhpCsFixer\Fixer\Basic\Psr4Fixer
  • PhpCsFixer\Fixer\Casing\ConstantCaseFixer
  • PhpCsFixer\Fixer\Casing\LowercaseKeywordsFixer
  • PhpCsFixer\Fixer\Casing\MagicConstantCasingFixer
  • PhpCsFixer\Fixer\Casing\NativeFunctionCasingFixer
  • PhpCsFixer\Fixer\CastNotation\LowercaseCastFixer
  • PhpCsFixer\Fixer\CastNotation\ModernizeTypesCastingFixer
  • PhpCsFixer\Fixer\CastNotation\NoShortBoolCastFixer
  • PhpCsFixer\Fixer\CastNotation\ShortScalarCastFixer
  • PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer
  • PhpCsFixer\Fixer\ClassNotation\FinalInternalClassFixer
  • PhpCsFixer\Fixer\ClassNotation\NoNullPropertyInitializationFixer
  • PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer
  • PhpCsFixer\Fixer\ClassNotation\SelfAccessorFixer
  • PhpCsFixer\Fixer\Comment\NoEmptyCommentFixer
  • PhpCsFixer\Fixer\Comment\NoTrailingWhitespaceInCommentFixer
  • PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer
  • PhpCsFixer\Fixer\ControlStructure\ElseifFixer
  • PhpCsFixer\Fixer\ControlStructure\IncludeFixer
  • PhpCsFixer\Fixer\ControlStructure\NoBreakCommentFixer
  • PhpCsFixer\Fixer\ControlStructure\NoTrailingCommaInListCallFixer
  • PhpCsFixer\Fixer\ControlStructure\NoUnneededControlParenthesesFixer
  • PhpCsFixer\Fixer\ControlStructure\NoUselessElseFixer
  • PhpCsFixer\Fixer\ControlStructure\SwitchCaseSemicolonToColonFixer
  • PhpCsFixer\Fixer\ControlStructure\SwitchCaseSpaceFixer
  • PhpCsFixer\Fixer\FunctionNotation\CombineNestedDirnameFixer
  • PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer
  • PhpCsFixer\Fixer\FunctionNotation\NoSpacesAfterFunctionNameFixer
  • PhpCsFixer\Fixer\FunctionNotation\NoUnreachableDefaultArgumentValueFixer
  • PhpCsFixer\Fixer\FunctionNotation\VoidReturnFixer
  • PhpCsFixer\Fixer\Import\OrderedImportsFixer
  • PhpCsFixer\Fixer\Import\SingleImportPerStatementFixer
  • PhpCsFixer\Fixer\LanguageConstruct\CombineConsecutiveIssetsFixer
  • PhpCsFixer\Fixer\LanguageConstruct\CombineConsecutiveUnsetsFixer
  • PhpCsFixer\Fixer\LanguageConstruct\DeclareEqualNormalizeFixer
  • PhpCsFixer\Fixer\LanguageConstruct\DirConstantFixer
  • PhpCsFixer\Fixer\LanguageConstruct\IsNullFixer
  • PhpCsFixer\Fixer\LanguageConstruct\NoUnsetOnPropertyFixer
  • PhpCsFixer\Fixer\NamespaceNotation\NoLeadingNamespaceWhitespaceFixer
  • PhpCsFixer\Fixer\NamespaceNotation\SingleBlankLineBeforeNamespaceFixer
  • PhpCsFixer\Fixer\Operator\ConcatSpaceFixer
  • PhpCsFixer\Fixer\Operator\LogicalOperatorsFixer
  • PhpCsFixer\Fixer\Operator\ObjectOperatorWithoutWhitespaceFixer
  • PhpCsFixer\Fixer\Operator\StandardizeIncrementFixer
  • PhpCsFixer\Fixer\Operator\StandardizeNotEqualsFixer
  • PhpCsFixer\Fixer\Operator\TernaryOperatorSpacesFixer
  • PhpCsFixer\Fixer\Operator\TernaryToNullCoalescingFixer
  • PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer
  • PhpCsFixer\Fixer\PhpTag\FullOpeningTagFixer
  • PhpCsFixer\Fixer\PhpTag\LinebreakAfterOpeningTagFixer
  • PhpCsFixer\Fixer\PhpTag\NoClosingTagFixer
  • PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer
  • PhpCsFixer\Fixer\Phpdoc\PhpdocIndentFixer
  • PhpCsFixer\Fixer\Phpdoc\PhpdocTrimConsecutiveBlankLineSeparationFixer
  • PhpCsFixer\Fixer\Phpdoc\PhpdocTrimFixer
  • PhpCsFixer\Fixer\Phpdoc\PhpdocTypesFixer
  • PhpCsFixer\Fixer\Phpdoc\PhpdocTypesOrderFixer
  • PhpCsFixer\Fixer\Semicolon\NoEmptyStatementFixer
  • PhpCsFixer\Fixer\Semicolon\NoSinglelineWhitespaceBeforeSemicolonsFixer
  • PhpCsFixer\Fixer\Semicolon\SpaceAfterSemicolonFixer
  • PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer
  • PhpCsFixer\Fixer\Strict\StrictComparisonFixer
  • PhpCsFixer\Fixer\Strict\StrictParamFixer
  • PhpCsFixer\Fixer\StringNotation\EscapeImplicitBackslashesFixer
  • PhpCsFixer\Fixer\StringNotation\NoBinaryStringFixer
  • PhpCsFixer\Fixer\StringNotation\SimpleToComplexStringVariableFixer
  • PhpCsFixer\Fixer\StringNotation\SingleQuoteFixer
  • PhpCsFixer\Fixer\Whitespace\ArrayIndentationFixer
  • PhpCsFixer\Fixer\Whitespace\IndentationTypeFixer
  • PhpCsFixer\Fixer\Whitespace\NoSpacesAroundOffsetFixer
  • PhpCsFixer\Fixer\Whitespace\NoSpacesInsideParenthesisFixer
  • PhpCsFixer\Fixer\Whitespace\NoTrailingWhitespaceFixer
  • PhpCsFixer\Fixer\Whitespace\NoWhitespaceInBlankLineFixer
  • PhpCsFixer\Fixer\Whitespace\SingleBlankLineAtEofFixer
  • SlevomatCodingStandard\Sniffs\Classes\ConstantSpacingSniff
  • SlevomatCodingStandard\Sniffs\Classes\DisallowMultiPropertyDefinitionSniff
  • SlevomatCodingStandard\Sniffs\Classes\ModernClassNameReferenceSniff
  • SlevomatCodingStandard\Sniffs\Classes\PropertySpacingSniff
  • SlevomatCodingStandard\Sniffs\Classes\RequireMultiLineMethodSignatureSniff
  • SlevomatCodingStandard\Sniffs\Classes\SuperfluousAbstractClassNamingSniff
  • SlevomatCodingStandard\Sniffs\Classes\SuperfluousErrorNamingSniff
  • SlevomatCodingStandard\Sniffs\Classes\SuperfluousInterfaceNamingSniff
  • SlevomatCodingStandard\Sniffs\Classes\SuperfluousTraitNamingSniff
  • SlevomatCodingStandard\Sniffs\Classes\TraitUseDeclarationSniff
  • SlevomatCodingStandard\Sniffs\Classes\TraitUseSpacingSniff
  • SlevomatCodingStandard\Sniffs\Commenting\DeprecatedAnnotationDeclarationSniff
  • SlevomatCodingStandard\Sniffs\Commenting\RequireOneLinePropertyDocCommentSniff
  • SlevomatCodingStandard\Sniffs\Commenting\UselessFunctionDocCommentSniff
  • SlevomatCodingStandard\Sniffs\Commenting\UselessInheritDocCommentSniff
  • SlevomatCodingStandard\Sniffs\ControlStructures\DisallowYodaComparisonSniff
  • SlevomatCodingStandard\Sniffs\ControlStructures\NewWithParenthesesSniff
  • SlevomatCodingStandard\Sniffs\ControlStructures\RequireMultiLineTernaryOperatorSniff
  • SlevomatCodingStandard\Sniffs\ControlStructures\RequireNullCoalesceEqualOperatorSniff
  • SlevomatCodingStandard\Sniffs\ControlStructures\RequireNullCoalesceOperatorSniff
  • SlevomatCodingStandard\Sniffs\ControlStructures\RequireShortTernaryOperatorSniff
  • SlevomatCodingStandard\Sniffs\ControlStructures\RequireTernaryOperatorSniff
  • SlevomatCodingStandard\Sniffs\Exceptions\DeadCatchSniff
  • SlevomatCodingStandard\Sniffs\Functions\ArrowFunctionDeclarationSniff
  • SlevomatCodingStandard\Sniffs\Functions\RequireArrowFunctionSniff
  • SlevomatCodingStandard\Sniffs\Functions\TrailingCommaInCallSniff
  • SlevomatCodingStandard\Sniffs\Functions\UselessParameterDefaultValueSniff
  • SlevomatCodingStandard\Sniffs\Namespaces\UnusedUsesSniff
  • SlevomatCodingStandard\Sniffs\Namespaces\UseDoesNotStartWithBackslashSniff
  • SlevomatCodingStandard\Sniffs\Namespaces\UseFromSameNamespaceSniff
  • SlevomatCodingStandard\Sniffs\Namespaces\UselessAliasSniff
  • SlevomatCodingStandard\Sniffs\Numbers\RequireNumericLiteralSeparatorSniff
  • SlevomatCodingStandard\Sniffs\Operators\RequireCombinedAssignmentOperatorSniff
  • SlevomatCodingStandard\Sniffs\PHP\DisallowDirectMagicInvokeCallSniff
  • SlevomatCodingStandard\Sniffs\PHP\TypeCastSniff
  • SlevomatCodingStandard\Sniffs\TypeHints\LongTypeHintsSniff
  • SlevomatCodingStandard\Sniffs\TypeHints\NullTypeHintOnLastPositionSniff
  • SlevomatCodingStandard\Sniffs\TypeHints\ParameterTypeHintSniff
  • SlevomatCodingStandard\Sniffs\TypeHints\ParameterTypeHintSpacingSniff
  • SlevomatCodingStandard\Sniffs\TypeHints\PropertyTypeHintSniff
  • SlevomatCodingStandard\Sniffs\TypeHints\PropertyTypeHintSpacingSniff
  • SlevomatCodingStandard\Sniffs\TypeHints\ReturnTypeHintSniff
  • SlevomatCodingStandard\Sniffs\TypeHints\ReturnTypeHintSpacingSniff
  • SlevomatCodingStandard\Sniffs\TypeHints\UselessConstantTypeHintSniff