Download the PHP package corpus/coding-standard without Composer
On this page you can find all versions of the php package corpus/coding-standard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package coding-standard
Corpus Coding Standard
Corpus Coding Standard for PHP_CodeSniffer.
Requirements
- dealerdirect/phpcodesniffer-composer-installer: *
- squizlabs/php_codesniffer: *
- slevomat/coding-standard: ^8.14
- php: >=7.4
Installing
Install the latest version with:
Sniffs
Class: \Corpus\Sniffs\ControlStructures\ClosingBraceNewlineSniff
Sniff: Corpus.ControlStructures.ClosingBraceNewline
Ensure that all closing curly brackets are followed by a blank line.
Example:
Becomes:
Class: \Corpus\Sniffs\ControlStructures\OpeningOneTrueBraceSniff
Sniff: Corpus.ControlStructures.OpeningOneTrueBrace
Ensure that the K&R "One True Brace" style is used.
Example:
Becomes:
Class: \Corpus\Sniffs\General\BinaryOperationNewlineSniff
Sniff: Corpus.General.BinaryOperationNewline
Ensure that in multiline logical statements &&
and ||
lead lines rather than trail.
Example:
Becomes:
Class: \Corpus\Sniffs\General\ReturnTrailingNewlineSniff
Sniff: Corpus.General.ReturnTrailingNewline
Ensure that no blank lines separate return statements and following curly braces.
Example:
Becomes:
Class: \Corpus\Sniffs\Methods\ClosureSpacingSniff
Sniff: Corpus.Methods.ClosureSpacing
Force whitespace between function/fn keyword and opening paren on closures.
Example:
Becomes:
Class: \Corpus\Sniffs\Methods\MethodParameterFormattingSniff
Sniff: Corpus.Methods.MethodParameterFormatting
Set a maximum length for function arguments. Fix by breaking into multiple lines.
Example:
Becomes:
Inherited Sniffs
- Generic.ControlStructures.InlineControlStructure
- Generic.WhiteSpace.DisallowSpaceIndent
- Generic.Files.ByteOrderMark
- Generic.Files.LineEndings
- Generic.PHP.LowerCaseConstant
- Generic.PHP.LowerCaseKeyword
- Generic.PHP.DeprecatedFunctions
- Generic.NamingConventions.UpperCaseConstantName
- Generic.Formatting.NoSpaceAfterCast
- Generic.Functions.OpeningFunctionBraceKernighanRitchie
- PSR2.Files.ClosingTag
- PSR2.Classes.PropertyDeclaration
- PEAR.Functions.ValidDefaultValue
- Squiz.Classes.LowercaseClassKeywords
- Squiz.Classes.SelfMemberReference
- Squiz.Scope.MethodScope
- SlevomatCodingStandard.Namespaces.UnusedUses
- SlevomatCodingStandard.Namespaces.DisallowGroupUse
- SlevomatCodingStandard.Namespaces.MultipleUsesPerLine
- SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash
- SlevomatCodingStandard.Classes.TraitUseDeclaration
- SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure
- SlevomatCodingStandard.Functions.UselessParameterDefaultValue
- SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation
- SlevomatCodingStandard.ControlStructures.DisallowContinueWithoutIntegerOperandInSwitch
- SlevomatCodingStandard.Namespaces.UseFromSameNamespace
- SlevomatCodingStandard.Arrays.TrailingArrayComma
- SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator
- SlevomatCodingStandard.ControlStructures.RequireShortTernaryOperator
- SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn
- SlevomatCodingStandard.ControlStructures.UselessTernaryOperator
- SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses
- SlevomatCodingStandard.Namespaces.UselessAlias
- SlevomatCodingStandard.PHP.UselessSemicolon
- SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue
- SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces
- SlevomatCodingStandard.Variables.UselessVariable
- SlevomatCodingStandard.Operators.SpreadOperatorSpacing
- SlevomatCodingStandard.Classes.ParentCallSpacing
- SlevomatCodingStandard.ControlStructures.NewWithoutParentheses
- SlevomatCodingStandard.Commenting.UselessFunctionDocComment
- SlevomatCodingStandard.Classes.RequireSelfReference
- SlevomatCodingStandard.ControlStructures.NewWithoutParentheses
All versions of coding-standard with dependencies
squizlabs/php_codesniffer Version *
slevomat/coding-standard Version ^8.14
php Version >=7.4