mcode / mcode
PHP quality assurance for ModernTV projects.
Installs: 5 374
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 5
Forks: 3
Open Issues: 0
Language:Makefile
Requires
- php: >=7.2
- mockery/mockery: ^1.3.5
- php-parallel-lint/php-parallel-lint: ^1.3.0
- phpstan/phpstan: ^0.12.89
- phpstan/phpstan-nette: ^0.12.21
- phpstan/phpstan-strict-rules: ^0.12.9
- phpunit/phpunit: ^8.5.20
- slevomat/coding-standard: ^7.0
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2024-09-30 06:53:24 UTC
README
📺 PHP quality assurance for ModernTV projects.
🕹 f3l1x.io | 💻 f3l1x | 🐦 @xf3l1x
Usage
To install latest version of mcode/mcode
use Composer.
composer require mcode/mcode
Documentation
- Install this package.
- Create
ruleset.xml
file.
<?xml version="1.0" encoding="UTF-8"?> <ruleset> <rule ref="./vendor/mcode/mcode/src/codesniffer.xml"/> </ruleset>
- Run codesniffer.
vendor/bin/phpcs --cache=var/codesniffer.dat --standard=ruleset.xml app
ModernTV Coding Standart:
Generic.Arrays.DisallowLongArraySyntax
Generic.Classes.DuplicateClassName
Generic.CodeAnalysis.EmptyStatement
Generic.CodeAnalysis.UnconditionalIfStatement
Generic.CodeAnalysis.UnnecessaryFinalModifier
Generic.ControlStructures.InlineControlStructure
Generic.Files.ByteOrderMark
Generic.Files.InlineHTML
Generic.Files.LineEndings
Generic.Files.OneObjectStructurePerFile
Generic.Formatting.DisallowMultipleStatements
Generic.Formatting.SpaceAfterCast
Generic.Functions.FunctionCallArgumentSpacing
Generic.Functions.OpeningFunctionBraceBsdAllman
Generic.NamingConventions.CamelCapsFunctionName
Generic.NamingConventions.ConstructorName
Generic.NamingConventions.InterfaceNameSuffix
Generic.NamingConventions.UpperCaseConstantName
Generic.PHP.BacktickOperator
Generic.PHP.CharacterBeforePHPOpeningTag
Generic.PHP.DeprecatedFunctions
Generic.PHP.DisallowAlternativePHPTags
Generic.PHP.DisallowShortOpenTag
Generic.PHP.ForbiddenFunctions
Generic.PHP.LowerCaseConstant
Generic.PHP.LowerCaseKeyword
Generic.PHP.LowerCaseType
Generic.PHP.SAPIUsage
Generic.Strings.UnnecessaryStringConcat
Generic.WhiteSpace.DisallowTabIndent
Generic.WhiteSpace.IncrementDecrementSpacing
Generic.WhiteSpace.ScopeIndent
PEAR.Classes.ClassDeclaration
PEAR.Commenting.InlineComment
PEAR.Functions.ValidDefaultValue
PEAR.WhiteSpace.ObjectOperatorIndent
PSR2.Classes.PropertyDeclaration
PSR2.ControlStructures.ControlStructureSpacing
PSR2.ControlStructures.ElseIfDeclaration
PSR2.Files.ClosingTag
PSR2.Files.EndFileNewline
PSR2.Methods.FunctionCallSignature
PSR2.Methods.FunctionClosingBrace
PSR2.Namespaces.NamespaceDeclaration
PSR2.Namespaces.UseDeclaration
PSR12.Keywords.ShortFormTypeKeywords
PSR12.Properties.ConstantVisibility
SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation
SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace
SlevomatCodingStandard.Arrays.TrailingArrayComma
SlevomatCodingStandard.Classes.ClassConstantVisibility
SlevomatCodingStandard.Classes.ClassStructure
SlevomatCodingStandard.Classes.ConstantSpacing
SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants
SlevomatCodingStandard.Classes.DisallowMultiConstantDefinition
SlevomatCodingStandard.Classes.DisallowMultiPropertyDefinition
SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces
SlevomatCodingStandard.Classes.ModernClassNameReference
SlevomatCodingStandard.Classes.PropertyDeclaration
SlevomatCodingStandard.Classes.PropertySpacing
SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion
SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming
SlevomatCodingStandard.Classes.SuperfluousTraitNaming
SlevomatCodingStandard.Classes.TraitUseDeclaration
SlevomatCodingStandard.Classes.TraitUseSpacing
SlevomatCodingStandard.Classes.UselessLateStaticBinding
SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment
SlevomatCodingStandard.Commenting.EmptyComment
SlevomatCodingStandard.Commenting.ForbiddenAnnotations
SlevomatCodingStandard.Commenting.ForbiddenComments
SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration
SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment
SlevomatCodingStandard.Commenting.UselessFunctionDocComment
SlevomatCodingStandard.Commenting.UselessInheritDocComment
SlevomatCodingStandard.ControlStructures.BlockControlStructureSpacing
SlevomatCodingStandard.ControlStructures.DisallowYodaComparison
SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses
SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn
SlevomatCodingStandard.ControlStructures.UselessTernaryOperator
SlevomatCodingStandard.Files.TypeNameMatchesFileName
SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration
SlevomatCodingStandard.Functions.StaticClosure
SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure
SlevomatCodingStandard.Functions.UselessParameterDefaultValue
SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses
SlevomatCodingStandard.Namespaces.DisallowGroupUse
SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation
SlevomatCodingStandard.Namespaces.MultipleUsesPerLine
SlevomatCodingStandard.Namespaces.NamespaceDeclaration
SlevomatCodingStandard.Namespaces.NamespaceSpacing
SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly
SlevomatCodingStandard.Namespaces.RequireOneNamespaceInFile
SlevomatCodingStandard.Namespaces.UnusedUses
SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash
SlevomatCodingStandard.Namespaces.UseFromSameNamespace
SlevomatCodingStandard.Namespaces.UselessAlias
SlevomatCodingStandard.Namespaces.UseSpacing
SlevomatCodingStandard.PHP.ShortList
SlevomatCodingStandard.PHP.TypeCast
SlevomatCodingStandard.PHP.UselessParentheses
SlevomatCodingStandard.PHP.UselessSemicolon
SlevomatCodingStandard.TypeHints.DeclareStrictTypes
SlevomatCodingStandard.TypeHints.LongTypeHints
SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue
SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition
SlevomatCodingStandard.TypeHints.ParameterTypeHint
SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing
SlevomatCodingStandard.TypeHints.PropertyTypeHint
SlevomatCodingStandard.TypeHints.ReturnTypeHint
SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing
SlevomatCodingStandard.TypeHints.UnionTypeHintFormat
SlevomatCodingStandard.TypeHints.UselessConstantTypeHint
SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable
SlevomatCodingStandard.Variables.UnusedVariable
SlevomatCodingStandard.Variables.UselessVariable
Squiz.Arrays.ArrayBracketSpacing
Squiz.Arrays.ArrayDeclaration
Squiz.Classes.ClassFileName
Squiz.Classes.SelfMemberReference
Squiz.Classes.ValidClassName
Squiz.Commenting.DocCommentAlignment
Squiz.ControlStructures.ControlSignature
Squiz.Functions.FunctionDeclaration
Squiz.Functions.GlobalFunction
Squiz.Operators.ValidLogicalOperators
Squiz.PHP.GlobalKeyword
Squiz.PHP.InnerFunctions
Squiz.PHP.LowercasePHPFunctions
Squiz.PHP.NonExecutableCode
Squiz.Scope.MethodScope
Squiz.Scope.StaticThisUsage
Squiz.Strings.ConcatenationSpacing
Squiz.WhiteSpace.CastSpacing
Squiz.WhiteSpace.ControlStructureSpacing
Squiz.WhiteSpace.FunctionOpeningBraceSpace
Squiz.WhiteSpace.FunctionSpacing
Squiz.WhiteSpace.LanguageConstructSpacing
Squiz.WhiteSpace.LogicalOperatorSpacing
Squiz.WhiteSpace.ObjectOperatorSpacing
Squiz.WhiteSpace.OperatorSpacing
Squiz.WhiteSpace.ScopeClosingBrace
Squiz.WhiteSpace.ScopeKeywordSpacing
Squiz.WhiteSpace.SemicolonSpacing
Squiz.WhiteSpace.SuperfluousWhitespace
Unused rules:
Generic.CodeAnalysis.ForLoopShouldBeWhileLoop
Generic.Commenting.DocComment
Generic.WhiteSpace.DisallowSpaceIndent
PEAR.Formatting.MultiLineAssignment
PSR1.Classes.ClassDeclaration
PSR1.Files.SideEffects
PSR1.Methods.CamelCapsMethodName
PSR2.ControlStructures.SwitchDeclaration
PSR2.Methods.MethodDeclaration
SlevomatCodingStandard.Arrays.AlphabeticallySortedByKeys
SlevomatCodingStandard.Arrays.DisallowPartiallyKeyed
SlevomatCodingStandard.Arrays.MultiLineArrayEndBracketPlacement
SlevomatCodingStandard.Arrays.ArrayAccessSniff
SlevomatCodingStandard.Attributes.AttributeAndTargetSpacing
SlevomatCodingStandard.Attributes.AttributesOrder
SlevomatCodingStandard.Attributes.DisallowAttributesJoining
SlevomatCodingStandard.Attributes.DisallowMultipleAttributesPerLine
SlevomatCodingStandard.Attributes.RequireAttributeAfterDocComment
SlevomatCodingStandard.Classes.BackedEnumTypeSpacing
SlevomatCodingStandard.Classes.ClassLength
SlevomatCodingStandard.Classes.ClassMemberSpacing
SlevomatCodingStandard.Classes.DisallowConstructorPropertyPromotion
SlevomatCodingStandard.Classes.DisallowStringExpressionPropertyFetch
SlevomatCodingStandard.Classes.EnumCaseSpacing
SlevomatCodingStandard.Classes.ForbiddenPublicProperty
SlevomatCodingStandard.Classes.MethodSpacing
SlevomatCodingStandard.Classes.ParentCallSpacing
SlevomatCodingStandard.Classes.RequireAbstractOrFinal
SlevomatCodingStandard.Classes.RequireMultiLineMethodSignature
SlevomatCodingStandard.Classes.RequireSelfReference
SlevomatCodingStandard.Classes.RequireSingleLineMethodSignature
SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming
SlevomatCodingStandard.Classes.SuperfluousErrorNaming
SlevomatCodingStandard.Classes.SuperfluousExceptionNaming
SlevomatCodingStandard.Commenting.AnnotationName
SlevomatCodingStandard.Commenting.DeprecatedAnnotationDeclaration
SlevomatCodingStandard.Commenting.DisallowCommentAfterCode
SlevomatCodingStandard.Commenting.DocCommentSpacing
SlevomatCodingStandard.Commenting.RequireOneLineDocComment
SlevomatCodingStandard.Complexity.Cognitive
SlevomatCodingStandard.ControlStructures.AssignmentInCondition
SlevomatCodingStandard.ControlStructures.DisallowContinueWithoutIntegerOperandInSwitch
SlevomatCodingStandard.ControlStructures.DisallowEmpty
SlevomatCodingStandard.ControlStructures.DisallowNullSafeObjectOperator
SlevomatCodingStandard.ControlStructures.DisallowShortTernaryOperator
SlevomatCodingStandard.ControlStructures.DisallowTrailingMultiLineTernaryOperatorSniff
SlevomatCodingStandard.ControlStructures.EarlyExit
SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing
SlevomatCodingStandard.ControlStructures.NewWithParentheses
SlevomatCodingStandard.ControlStructures.NewWithoutParentheses
SlevomatCodingStandard.ControlStructures.RequireMultiLineCondition
SlevomatCodingStandard.ControlStructures.RequireMultiLineTernaryOperator
SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator
SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator
SlevomatCodingStandard.ControlStructures.RequireNullSafeObjectOperator
SlevomatCodingStandard.ControlStructures.RequireShortTernaryOperator
SlevomatCodingStandard.ControlStructures.RequireSingleLineCondition
SlevomatCodingStandard.ControlStructures.RequireTernaryOperator
SlevomatCodingStandard.ControlStructures.RequireYodaComparison
SlevomatCodingStandard.Exceptions.DeadCatch
SlevomatCodingStandard.Exceptions.DisallowNonCapturingCatch
SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly
SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch
SlevomatCodingStandard.Files.FileLength
SlevomatCodingStandard.Files.LineLength
SlevomatCodingStandard.Functions.ArrowFunctionDeclaration
SlevomatCodingStandard.Functions.DisallowArrowFunction
SlevomatCodingStandard.Functions.DisallowEmptyFunction
SlevomatCodingStandard.Functions.DisallowNamedArguments
SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall
SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse
SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration
SlevomatCodingStandard.Functions.FunctionLength
SlevomatCodingStandard.Functions.NamedArgumentSpacing
SlevomatCodingStandard.Functions.RequireArrowFunction
SlevomatCodingStandard.Functions.RequireMultiLineCall
SlevomatCodingStandard.Functions.RequireSingleLineCall
SlevomatCodingStandard.Functions.RequireTrailingCommaInCall
SlevomatCodingStandard.Functions.RequireTrailingCommaInClosureUse
SlevomatCodingStandard.Functions.StrictCall
SlevomatCodingStandard.Functions.UnusedParameter
SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions
SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants
SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions
SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces
SlevomatCodingStandard.Numbers.DisallowNumericLiteralSeparator
SlevomatCodingStandard.Numbers.RequireNumericLiteralSeparator
SlevomatCodingStandard.Operators.DisallowEqualOperators
SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators
SlevomatCodingStandard.Operators.NegationOperatorSpacing
SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator
SlevomatCodingStandard.Operators.RequireOnlyStandaloneIncrementAndDecrementOperators
SlevomatCodingStandard.Operators.SpreadOperatorSpacing
SlevomatCodingStandard.PHP.DisallowDirectMagicInvokeCall
SlevomatCodingStandard.PHP.DisallowReference
SlevomatCodingStandard.PHP.ForbiddenClasses
SlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking
SlevomatCodingStandard.PHP.ReferenceSpacing
SlevomatCodingStandard.PHP.RequireExplicitAssertion
SlevomatCodingStandard.PHP.RequireNowdoc
SlevomatCodingStandard.Strings.DisallowVariableParsing
SlevomatCodingStandard.TypeHints.DisallowArrayTypeHintSyntax
SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint
SlevomatCodingStandard.Variables.DisallowVariableVariable
SlevomatCodingStandard.Variables.DisallowSuperGlobalVariable
SlevomatCodingStandard.Whitespaces.DuplicateSpaces
Squiz.Commenting.EmptyCatchComment
Squiz.Commenting.FunctionComment
Squiz.Commenting.VariableComment
Squiz.ControlStructures.ForEachLoopDeclaration
Squiz.ControlStructures.ForLoopDeclaration
Squiz.Functions.FunctionDeclarationArgumentSpacing
Squiz.Functions.MultiLineFunctionDeclaration
Squiz.Operators.IncrementDecrementUsage
Squiz.PHP.Heredoc
Squiz.Strings.DoubleQuoteUsage
Squiz.Strings.EchoedStrings
Development
This package is currently maintained by these authors.