sumofuturo/php-coding-standard

Sumofuturo coding standard for PHP projects

Installs: 39

Dependents: 0

Suggesters: 0

Security: 0

Type:phpcodesniffer-standard

v1.0.2 2018-02-10 07:52 UTC

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]