PHPackages                             allysonsilva/php-coding-standard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. allysonsilva/php-coding-standard

ActivePhpcodesniffer-standard[Testing &amp; Quality](/categories/testing)

allysonsilva/php-coding-standard
================================

Coding Standard for PHP\_CodeSniffer.

v0.1.0(6y ago)016MITPHP ^7.2

Since Mar 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/allysonsilva/php-coding-standard)[ Packagist](https://packagist.org/packages/allysonsilva/php-coding-standard)[ Docs](https://github.com/allysonsilva/php-coding-standard)[ RSS](/packages/allysonsilva-php-coding-standard/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Custom Code Standart Rules For [PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)
===============================================================================================

[](#custom-code-standart-rules-for-php_codesniffer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/97201878fd683fb6a9b88e0dc615b12b0a137c17dbcb4275fbb3afc8336605d6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c6c79736f6e73696c76612f7068702d636f64696e672d7374616e646172642e7376673f7374796c653d666f722d7468652d6261646765266c6162656c3d4c6174657374)](https://packagist.org/packages/allysonsilva/php-coding-standard)[![PHP Version](https://camo.githubusercontent.com/437569f04912751cd7d48195d19a4dc1cd9cbfc2a9715fb8ed4ed85f5001eb00/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f616c6c79736f6e73696c76612f7068702d636f64696e672d7374616e646172642e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6162656c3d50485026636f6c6f723d343734413841266c6162656c436f6c6f723d373837434235266c6f676f436f6c6f723d7768697465)](link-github)[![Total Downloads](https://camo.githubusercontent.com/0ef542ccb89a44b34e2f645002a70e9112209c678ace36855f84379208000999/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c6c79736f6e73696c76612f7068702d636f64696e672d7374616e646172642e7376673f7374796c653d666f722d7468652d6261646765266c6162656c3d546f74616c2b646f776e6c6f616473)](https://packagist.org/packages/allysonsilva/php-coding-standard)[![Software License](https://camo.githubusercontent.com/9897f4467850972a38c7db9a4d38280b8fcdac0ada00e9c8c0a72ecfa8551653/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666f722d7468652d6261646765)](LICENSE)

Install
-------

[](#install)

> **Requires [PHP 7.2+](https://php.net/releases/)**

To get started with `php-coding-standard`, use Composer to add the package to your project's dependencies:

```
composer require allysonsilva/php-coding-standard --dev
```

Sniffs
------

[](#sniffs)

> Use the command to check the amount of sniffs in Coding Standard applied:

```
./vendor/bin/phpcs --standard=PSR12 -e
// or
./vendor/bin/phpcs --standard=Generic -e
```

> Use the command to view documentation for any specific sniffs:

```
./vendor/bin/phpcs --standard=PSR12 --sniffs=PSR12.Namespaces.CompoundNamespaceDepth --generator=text
// or
./vendor/bin/phpcs --standard=Squiz --sniffs=Squiz.Classes.SelfMemberReference --generator=text
```

**The `AppStandard` standard contains 168 sniffs:**

```
Generic (39 sniffs)
-------------------
  Generic.Arrays.ArrayIndent
  Generic.Arrays.DisallowLongArraySyntax
  Generic.Classes.DuplicateClassName
  Generic.CodeAnalysis.EmptyPHPStatement
  Generic.CodeAnalysis.EmptyStatement
  Generic.CodeAnalysis.UnconditionalIfStatement
  Generic.CodeAnalysis.UnnecessaryFinalModifier
  Generic.CodeAnalysis.UnusedFunctionParameter
  Generic.CodeAnalysis.UselessOverridingMethod
  Generic.ControlStructures.InlineControlStructure
  Generic.Files.ByteOrderMark
  Generic.Files.InlineHTML
  Generic.Files.LineEndings
  Generic.Files.LineLength
  Generic.Files.OneClassPerFile
  Generic.Files.OneInterfacePerFile
  Generic.Files.OneObjectStructurePerFile
  Generic.Files.OneTraitPerFile
  Generic.Formatting.DisallowMultipleStatements
  Generic.Formatting.SpaceAfterCast
  Generic.Formatting.SpaceAfterNot
  Generic.Functions.CallTimePassByReference
  Generic.Functions.FunctionCallArgumentSpacing
  Generic.NamingConventions.UpperCaseConstantName
  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.Strings.UnnecessaryStringConcat
  Generic.WhiteSpace.ArbitraryParenthesesSpacing
  Generic.WhiteSpace.DisallowTabIndent
  Generic.WhiteSpace.IncrementDecrementSpacing
  Generic.WhiteSpace.LanguageConstructSpacing
  Generic.WhiteSpace.ScopeIndent
  Generic.WhiteSpace.SpreadOperatorSpacingAfter

ObjectCalisthenics (9 sniffs)
-----------------------------
  ObjectCalisthenics.Classes.ForbiddenPublicProperty
  ObjectCalisthenics.CodeAnalysis.OneObjectOperatorPerLine
  ObjectCalisthenics.Files.ClassTraitAndInterfaceLength
  ObjectCalisthenics.Files.FunctionLength
  ObjectCalisthenics.Metrics.MaxNestingLevel
  ObjectCalisthenics.Metrics.MethodPerClassLimit
  ObjectCalisthenics.Metrics.PropertyPerClassLimit
  ObjectCalisthenics.NamingConventions.ElementNameMinimalLength
  ObjectCalisthenics.NamingConventions.NoSetter

PEAR (4 sniffs)
---------------
  PEAR.Commenting.InlineComment
  PEAR.Functions.ValidDefaultValue
  PEAR.WhiteSpace.ObjectOperatorIndent
  PEAR.WhiteSpace.ScopeClosingBrace

PSR1 (3 sniffs)
---------------
  PSR1.Classes.ClassDeclaration
  PSR1.Files.SideEffects
  PSR1.Methods.CamelCapsMethodName

PSR12 (16 sniffs)
-----------------
  PSR12.Classes.AnonClassDeclaration
  PSR12.Classes.ClassInstantiation
  PSR12.Classes.ClosingBrace
  PSR12.ControlStructures.BooleanOperatorPlacement
  PSR12.ControlStructures.ControlStructureSpacing
  PSR12.Files.DeclareStatement
  PSR12.Files.FileHeader
  PSR12.Files.ImportStatement
  PSR12.Files.OpenTag
  PSR12.Functions.NullableTypeDeclaration
  PSR12.Functions.ReturnTypeDeclaration
  PSR12.Keywords.ShortFormTypeKeywords
  PSR12.Namespaces.CompoundNamespaceDepth
  PSR12.Operators.OperatorSpacing
  PSR12.Properties.ConstantVisibility
  PSR12.Traits.UseDeclaration

PSR2 (9 sniffs)
---------------
  PSR2.Classes.ClassDeclaration
  PSR2.Classes.PropertyDeclaration
  PSR2.ControlStructures.ElseIfDeclaration
  PSR2.ControlStructures.SwitchDeclaration
  PSR2.Files.ClosingTag
  PSR2.Files.EndFileNewline
  PSR2.Methods.FunctionCallSignature
  PSR2.Methods.FunctionClosingBrace
  PSR2.Methods.MethodDeclaration

SlevomatCodingStandard (48 sniffs)
----------------------------------
  SlevomatCodingStandard.Arrays.TrailingArrayComma
  SlevomatCodingStandard.Classes.ClassConstantVisibility
  SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants
  SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces
  SlevomatCodingStandard.Classes.ModernClassNameReference
  SlevomatCodingStandard.Classes.TraitUseSpacing
  SlevomatCodingStandard.Classes.UnusedPrivateElements
  SlevomatCodingStandard.Classes.UselessLateStaticBinding
  SlevomatCodingStandard.Commenting.DocCommentSpacing
  SlevomatCodingStandard.Commenting.ForbiddenAnnotations
  SlevomatCodingStandard.Commenting.ForbiddenComments
  SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration
  SlevomatCodingStandard.ControlStructures.ControlStructureSpacing
  SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses
  SlevomatCodingStandard.ControlStructures.NewWithParentheses
  SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator
  SlevomatCodingStandard.ControlStructures.RequireShortTernaryOperator
  SlevomatCodingStandard.Exceptions.DeadCatch
  SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure
  SlevomatCodingStandard.Functions.UnusedParameter
  SlevomatCodingStandard.Functions.UselessParameterDefaultValue
  SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses
  SlevomatCodingStandard.Namespaces.NamespaceDeclaration
  SlevomatCodingStandard.Namespaces.NamespaceSpacing
  SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly
  SlevomatCodingStandard.Namespaces.RequireOneNamespaceInFile
  SlevomatCodingStandard.Namespaces.UnusedUses
  SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash
  SlevomatCodingStandard.Namespaces.UseFromSameNamespace
  SlevomatCodingStandard.Namespaces.UseSpacing
  SlevomatCodingStandard.Namespaces.UselessAlias
  SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator
  SlevomatCodingStandard.Operators.SpreadOperatorSpacing
  SlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking
  SlevomatCodingStandard.PHP.ShortList
  SlevomatCodingStandard.PHP.TypeCast
  SlevomatCodingStandard.PHP.UselessSemicolon
  SlevomatCodingStandard.TypeHints.DeclareStrictTypes
  SlevomatCodingStandard.TypeHints.LongTypeHints
  SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition
  SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue
  SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing
  SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing
  SlevomatCodingStandard.TypeHints.TypeHintDeclaration
  SlevomatCodingStandard.TypeHints.UselessConstantTypeHint
  SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable
  SlevomatCodingStandard.Variables.UnusedVariable
  SlevomatCodingStandard.Variables.UselessVariable

Squiz (40 sniffs)
-----------------
  Squiz.Arrays.ArrayBracketSpacing
  Squiz.Arrays.ArrayDeclaration
  Squiz.Classes.ClassFileName
  Squiz.Classes.LowercaseClassKeywords
  Squiz.Classes.SelfMemberReference
  Squiz.Classes.ValidClassName
  Squiz.Commenting.DocCommentAlignment
  Squiz.Commenting.FunctionComment
  Squiz.Commenting.FunctionCommentThrowTag
  Squiz.ControlStructures.ControlSignature
  Squiz.ControlStructures.ForEachLoopDeclaration
  Squiz.ControlStructures.ForLoopDeclaration
  Squiz.ControlStructures.LowercaseDeclaration
  Squiz.Functions.FunctionDeclaration
  Squiz.Functions.FunctionDeclarationArgumentSpacing
  Squiz.Functions.GlobalFunction
  Squiz.Functions.LowercaseFunctionKeywords
  Squiz.Functions.MultiLineFunctionDeclaration
  Squiz.NamingConventions.ValidVariableName
  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.Strings.DoubleQuoteUsage
  Squiz.Strings.EchoedStrings
  Squiz.WhiteSpace.CastSpacing
  Squiz.WhiteSpace.ControlStructureSpacing
  Squiz.WhiteSpace.FunctionOpeningBraceSpace
  Squiz.WhiteSpace.FunctionSpacing
  Squiz.WhiteSpace.LanguageConstructSpacing
  Squiz.WhiteSpace.LogicalOperatorSpacing
  Squiz.WhiteSpace.ObjectOperatorSpacing
  Squiz.WhiteSpace.ScopeClosingBrace
  Squiz.WhiteSpace.ScopeKeywordSpacing
  Squiz.WhiteSpace.SemicolonSpacing
  Squiz.WhiteSpace.SuperfluousWhitespace

```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

### Happy coding!

[](#happy-coding)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2250d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fd36b56d067b44c24c0d90296ce2402289392010db273981fd4a96bee0f6d491?d=identicon)[AllysonSilva](/maintainers/AllysonSilva)

---

Tags

calisthenics-rulescoding-standardscoding-stylephpphp-codesniffersolidphpphpcsstylestandardsniffercoding

### Embed Badge

![Health badge](/badges/allysonsilva-php-coding-standard/health.svg)

```
[![Health](https://phpackages.com/badges/allysonsilva-php-coding-standard/health.svg)](https://phpackages.com/packages/allysonsilva-php-coding-standard)
```

###  Alternatives

[doctrine/coding-standard

The Doctrine Coding Standard is a set of PHPCS rules applied to all Doctrine projects.

31914.1M736](/packages/doctrine-coding-standard)[consistence/coding-standard

Consistence - Coding Standard - PHP Code Sniffer rules

75833.3k93](/packages/consistence-coding-standard)[moodlehq/moodle-cs

Moodle Coding Sniffer rules

242.8M5](/packages/moodlehq-moodle-cs)[leroy-merlin-br/coding-standard

The coding standard for PHP projects on LMBR

2137.0k10](/packages/leroy-merlin-br-coding-standard)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
