All Projects → roots → guidelines

roots / guidelines

Licence: other
Coding and contributing guidelines for Roots projects

Roots Coding and Contributing Guidelines

PHP

PSR-2 coding style with the following changes:

  • 2 spaces indentation
  • Opening and closing braces for functions and classes forced on the same line
  • Forced newline after opening brace

Additional rules:

  • Use Roots\ namespace
  • Use short array syntax
  • Use short echo syntax

You can check if your contribution passes the styleguide by installing PHP CodeSniffer and running the following in your project directory:

phpcs --standard=ruleset.xml --extensions=php --ignore=node_modules,bower_components,vendor -n -s .

JavaScript

Every JavaScript contribution is run against the Google JavaScript Styleguide. You can check if your contribution passes the styleguide by installing JSCS and running the following in your project directory:

npm run jscs
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].