Skip to content

Coding style standards and ruleset for Event Espresso products

License

Notifications You must be signed in to change notification settings

eventespresso/ee-coding-standards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Espresso Coding Standards

EventEspresso Coding Standards (EventEspressoCS) is a project with rulesets for code style and quality tools to be used in Event Espresso php projects.

Installation

Standalone

Standards are provided as Composer package and can be installed with:

composer create-project eventespresso/ee-coding-standards:dev-master

Composer will automatically install dependencies, register standards paths, and set default PHP Code Sniffer standard to EventEspresso.


As dependency

To include standards as part of a project require them as development dependencies:

composer require eventespresso/ee-coding-standards:dev-master --dev

Note that Composer won't run configuration scripts in this scenario and the root project needs to take care of it.

PHP Code Sniffer

Set of PHP Code Sniffer rules. Our standards follow PSR-2

Severity levels:

  • error level issues are considered mandatory to fix in Yoast projects and enforced in continuous integration
  • warning level issues are considered recommended to fix

Command line

"vendor/bin/phpcs" --extensions=php /path/to/folder/

PhpStorm

Refer to Using PHP Code Sniffer Tool in PhpStorm documentation.

After installation EventEspresso standard will be available as a choice in PHP Code Sniffer Validation inspection.

About

Coding style standards and ruleset for Event Espresso products

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published