Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Coding Standard Laravel Package

consistence/coding-standard

PHP coding standard for Consistence projects: a ready-to-use PHP_CodeSniffer ruleset plus configuration to enforce consistent style, naming, and best practices across codebases. Easy to adopt in CI and local development to keep code clean and uniform.

View on GitHub
Deep Wiki
Context7
3.10.1

Fixes

  • Disable errors with false positives in Squiz.Arrays.ArrayDeclaration (#64)
  • Fix Slevomat Coding Standard dependency to support minor versions (#63, thanks to @krns)
3.10

Maintenance

3.9

Improvements

  • Check spacing before assignments (#58)

Maintenance

3.7

Fixes

  • Exclude function spacing that has separate code for last line (#53)

Maintenance

3.6
  • Support for PHP 7.3 (#51)
3.5
  • Additional sniffs for checking current standard (#50)
    • check that [@var](https://github.com/var) is not used for constants
    • check that PHPDoc containing only {[@inheritDoc](https://github.com/inheritDoc)} is not used
3.4
  • Check PHPDoc and typehints declaration (#45)
    • check for missing property types in PHPDoc [@var](https://github.com/var)
    • check for missing typehints in case they can be declared
    • check for missing [@return](https://github.com/return) and/or native return typehint in case the method body contains return with a value
    • check for useless doc comments
    • forces to specify what's in traversable types like array, iterable and \Traversable
3.3.1
  • Exclude errors reporting false positives for multi line nested array access (#44)
3.3
  • Additional sniffs for checking current standard (#43)
    • check more language construct spacing cases
    • check that PHP types used for type hints, return types, and type casting are lowercase
    • check whitespace inside parenthesis that do not belong to a function call/declaration or control structure
3.1
  • Additional sniffs for checking current standard (#41)
    • check more namespace declaration rules
    • check not using empty()
    • check using short PHP lists
3.0.1
  • Remove Squiz.WhiteSpace.ControlStructureSpacing since there should be no error codes left for checking (#38)
3.0

New features

  • Additional sniffs for checking current standard (#34)
    • check that there are parentheses when calling constructor even when no parameters are given
    • check that single line content PHPDocs are actually written in single line
    • check that language expressions are not written with parentheses if possible
    • check that there are no empty comments

Rule changes

  • Use float instead of double or real (#35)
  • Forbid (binary) and (unset) typecasts (#36)
  • Disallow empty() since it is magic (#37)

Maintenance

2.4
  • support for PHP 7.2 (#32)
2.3.1
  • fix PHPCS BC break: DetectedCATCH -> DetectedCatch (#31)
2.3
2.2.1
  • Custom Exception last argument is considered chainable (#27)
  • Error last argument is considered chainable (#28)
2.2
  • Remove DisallowAlternativePHPTags as they have been removed from PHP 7.0 onwards (#25)
  • PHP_CodeSniffer 3.1 (#26)
  • New sniff Consistence.Exceptions.ExceptionDeclaration checks exception rules from the standard (#19 thanks to @mhujer)
    • Exception name must end with Exception
    • Exception must be chainable
    • Exception must be placed in exception (configurable) directory
1.0

New features

  • PHP 7.0 and 7.1 coding standard rules (#9)
  • Slevomat sniffs for checking the standard (#11)
    • This includes primarily sniffs for checking namespaces, uses, scalar type hints and other PHP 7 features.

Rule changes

  • Trait uses must be FQN (#12)
  • Remove rules for creating exception interface hierarchies (#13)
  • Remove rule for separating namespace uses by top-level namespace (#14)
  • Require bool and int in PHPDoc to be consistent with PHP's scalar types (#15)
  • Rules for writing inline [@var](https://github.com/var) (#16)

See respective PRs for details and reasons.

Maintenance

0.12
  • PHP_CodeSniffer 2.7
  • enable Generic.PHP.DisallowAlternativePHPTags sniff
  • enable ignoreNewlines for Squiz.WhiteSpace.ObjectOperatorSpacing to support multiline calls
  • Squiz.Functions.MultiLineFunctionDeclaration has been reworked to work with return type hints
0.11.1
  • exclude Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterBracket because it conflicts with return type hints in anonymous functions (function foo(): int {})
0.10.1
  • Fixing compatibility issue raised in PHP_CodeSniffer 2.5.1 where false positives are reported for code, which is inteded to run on PHP 5, but is checked under PHP 7 (caused by phpcs#858).
    • If you use this library in a PHP 7 only project, you may want to re-enable Squiz.Commenting.FunctionComment.TypeHintMissing in your ruleset.
  • Re-enabled more checks for multi-line calls, because comments in them are now tolerated phpcs#794.
0.10
0.9
  • PHP_CodeSniffer 2.5 with better PHP 7 support
  • better handling of multiline function calls and declarations
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor