Skip to content

QubusPHP/qubus-coding-standard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QubusPHP Coding Standards

Coding standard rulesets for QubusPHP.

QubusPHP coding standards loosely follows the Laminas Coding Style Guide with a few exceptions:

  1. Abstract classes MUST NOT be prefixed/suffixed with Abstract.
  2. Traits MUST NOT be prefixed/suffixed with Trait.
  3. Interfaces MUST NOT be prefixed/suffixed with Interface or Contract.
  4. Exceptions MUST be suffixed with Exception.
  5. File name of classes must be in PascalCase.
  6. File names of functions must be in lowercase and can be delimited with _.
  7. Custom functions must be namespaced and imported when used.
  8. Classes must be coded to interfaces and follow SOLID.

Installation

  1. Install the coding standard as a dependency of your project:
$ composer require --dev qubus/qubus-coding-standard
  1. Add coding standard to the PHP_CodeSniffer install path:
 vendor/bin/phpcs --config-set installed_paths vendor/qubus/qubus-coding-standard
  1. Run the standards:
 vendor/bin/phpcs /path/to/code

About

Coding standard rulesets for QubusPHP components.

Topics

Resources

License

Stars

Watchers

Forks

Packages