phpcsstandards/phpcsdevcs
phpcsdevcs provides a set of PHP_CodeSniffer rules and configuration to enforce consistent coding standards across PHP projects. Drop-in standards for PHPCS with sensible defaults, helping teams catch style issues early and keep code clean and uniform.
Universal.PHP.RequireExitDieParenthesesUniversal.WhiteSpace.FirstClassCallableSpacingUniversal.Attributes.BracketSpacingUniversal.Attributes.DisallowAttributeParenthesesGeneric.CodeAnalysis.RequireExplicitBooleanOperatorPrecedenceGeneric.Strings.UnnecessaryHeredocGeneric.WhiteSpace.HereNowdocIdentifierSpacingSquiz.Operators.ComparisonOperatorUsage while excluding the Squiz.Operators.ComparisonOperatorUsage.ImplicitTrue error code.Modernize.FunctionCalls.Dirname (FileConstant error code only)NormalizedArrays.Arrays.ArrayBraceSpacingNormalizedArrays.Arrays.CommaAfterLastUniversal.Arrays.DuplicateArrayKeyUniversal.Arrays.MixedArrayKeyTypesUniversal.Arrays.MixedKeyedUnkeyedArrayUniversal.Classes.ModifierKeywordOrderUniversal.Classes.RequireAnonClassParenthesesUniversal.Classes.RequireFinalClassUniversal.CodeAnalysis.ConstructorDestructorReturnUniversal.CodeAnalysis.ForeachUniqueAssignmentUniversal.CodeAnalysis.NoDoubleNegativeUniversal.CodeAnalysis.NoEchoSprintfUniversal.CodeAnalysis.StaticInFinalClassUniversal.Constants.LowercaseClassResolutionKeywordUniversal.Constants.ModifierKeywordOrderUniversal.Constants.UppercaseMagicConstantsUniversal.ControlStructures.DisallowAlternativeSyntaxUniversal.ControlStructures.DisallowLonelyIfUniversal.Files.SeparateFunctionsFromOOUniversal.FunctionDeclarations.NoLongClosuresUniversal.FunctionDeclarations.RequireFinalMethodsInTraitsUniversal.Namespaces.DisallowCurlyBraceSyntaxUniversal.Namespaces.OneDeclarationPerFileUniversal.NamingConventions.NoReservedKeywordParameterNamesUniversal.OOStructures.AlphabeticExtendsImplementsUniversal.Operators.ConcatPositionUniversal.Operators.DisallowLogicalAndOrUniversal.Operators.DisallowShortTernaryUniversal.Operators.DisallowStandalonePostIncrementDecrementUniversal.Operators.TypeSeparatorSpacingUniversal.PHP.LowercasePHPTagUniversal.PHP.NoFQNTrueFalseNullUniversal.PHP.OneStatementInShortEchoTagUniversal.UseStatements.DisallowMixedGroupUseUniversal.UseStatements.DisallowUseConstUniversal.UseStatements.DisallowUseFunctionUniversal.UseStatements.KeywordSpacingUniversal.UseStatements.LowercaseFunctionConstUniversal.UseStatements.NoLeadingBackslashUniversal.UseStatements.NoUselessAliasesUniversal.WhiteSpace.AnonClassKeywordSpacingUniversal.WhiteSpace.CommaSpacingUniversal.WhiteSpace.PrecisionAlignmentNote: some of these additions may lead to duplicate messages for certain issues. If you come across this, please report the duplication.
^3.13.3 || ^4.0.0 (was ^3.6.2).^10.0.0@dev to benefit from hugely improved issue detection.
Includes excluding a number of additional error codes from the PHPCompatibility.Constants.NewConstants sniff to allow for polyfilled PHP tokens.PSR12.ControlStructures.BooleanOperatorPlacement will now enforce that boolean operators between two conditions on different lines will always be at the start of the second line.PPSR12.Files.FileHeader.SpacingAfterTagBlock error code (PHPCS 4.0+) has been excluded to allow for file docblocks to directly follow a PHP open tag at the top of a file.PEAR.Commenting.FileComment.DuplicateSinceTag error code has been excluded to allow for [@since](https://github.com/since) tags used as a changelog in file docblocks.composer update phpcsstandards/phpcsdevcs --with-dependencies to benefit from this.PHPCompatibility.Constants.NewConstants sniff have been excluded as the constants have been backfilled by PHPCS.^3.6.2.PSR12.Classes.OpeningBraceSpace sniff will be ignored.PHPCompatibility.Constants.NewConstants sniff are excluded as the constants have been backfilled by PHPCS.PHPCompatibility.Constants.NewConstants and PHPCompatibility.Constants.RemovedConstants sniffs are excluded as the constants are, or soon will be, backfilled by PHPCS.10.0 (currently in dev).Generic.Arrays.DisallowLongArraySyntax sniff.Squiz.PHP.NonExecutableCode.ReturnNotRequired code is excluded to allow for a return statement in an otherwise empty function (typical use: overloadable methods in an abstract class).PHPCompatibility.Constants.NewConstants.t_fnFound code is excluded as the constant is backfilled by PHPCS since PHPCS 3.5.3.0.4.1, while the maximum is ^0.7 (latest release).Initial release
How can I help you explore Laravel packages today?