sumofuturo / php-coding-standard
Sumofuturo coding standard for PHP projects
v1.0.2
2018-02-10 07:52 UTC
Requires
- php: ^7.1
- dealerdirect/phpcodesniffer-composer-installer: ^0.4.4
- slevomat/coding-standard: ^4.3 <4.4.4 || ^4.4.5
- squizlabs/php_codesniffer: ^3.0 <3.2 || ^3.2.3
This package is auto-updated.
Last update: 2024-06-11 00:19:56 UTC
README
Coding standard rules to be used with PHP_CodeSniffer in PHP projects.
The ruleset extends from PSR-2, and includes:
- Do not allow array long syntax (
array(...)
) - Make sure string concatenation operator is surrounded by spaces
- Do not allow superfluous whitespaces.
- Require
declare(strict_types=1);
at the beginning of every file - Do not allow unused use statements
- Require alphabetically ordered use statements
- Require strict comparisons (
===
and!==
instead of==
and!=
) - Require trailing comma on every element of multi-line arrays
- Require no spaces between return type hint colon and function closing brace [
function (...): string
]