laminas/laminas-coding-standard
Provides Laminas PHP coding standard rules and tooling to enforce consistent code style and quality across projects, integrating with CI to automate checks and help teams follow Laminas conventions.
Feature release (minor)
3.0.x bugfix release (patch)
Backwards incompatible release (major)
Feature release (minor)
Feature release (minor)
Feature release (minor)
2.2.x bugfix release (patch)
Feature release (minor)
2.1.x bugfix release (patch)
2.1.x bugfix release (patch)
2.1.x bugfix release (patch)
2.1.x bugfix release (patch)
dealerdirect/phpcodesniffer-composer-installer 0.7 and thus composer 2.0zendframework/zend-coding-standard#22 refactors documentation. It now follows the PHP-FIG PSR-12 style.
zendframework/zend-coding-standard#22 refactors the ruleset. It uses PSR-12 as the base ruleset with these additional rules:
goto language construct SHOULD NOT be used.global keyword MUST NOT be used.PHP_SAPI SHOULD be used instead of the php_sapi_name()
function.declare(strict_types=1) directive MUST be declared and be the first
statement in a file.[...] SHOULD be used instead of list(...).Abstract prefix.Exception suffix.Interface suffix.Trait suffix.self:: MUST be used without spaces
around the scope resolution operator.::class MUST be used instead of __CLASS__,
get_class(), get_class($this), get_called_class(), get_parent_class()
and string reference.$this MUST NOT be called inside a static method or
function.final keyword on methods MUST be omitted in final declared classes.break and continue structures with
a numeric argument argument.continue control structure MUST NOT be used in switch statements,
break SHOULD be used instead.=== instead of ==.&& and || operators SHOULD be used instead of and and or.use MUST be used in closures.# and MUST
NOT be empty. They SHOULD NOT be used for already typehinted arguments,
except arrays.[@param](https://github.com/param), [@return](https://github.com/return) and [@throws](https://github.com/throws) SHOULD not be aligned or
contain multiple spaces between the tag, type and description.[@throws](https://github.com/throws) tags.[@api](https://github.com/api), [@author](https://github.com/author), [@category](https://github.com/category), [@created](https://github.com/created), [@package](https://github.com/package),
[@subpackage](https://github.com/subpackage) and [@version](https://github.com/version) MUST NOT be used in comments. Git commits
provide accurate information.[@var](https://github.com/var) tag MAY be used in inline comments to document the Type
of properties. Single-line property comments with a [@var](https://github.com/var) tag SHOULD
be written as one-liners. The [@var](https://github.com/var) MAY NOT be used for constants.How can I help you explore Laravel packages today?