Skip to content

Style Guide

Daniel J. Furman edited this page Dec 19, 2017 · 7 revisions

Style Guide

General Wording

Wording matters. If you're not sure, ask!

All requirements should adhere to RFC-2119 conventions, but in the spirit of agile, understand that epics and stories (issues) are conversation starters and should be discussed within each thread, so these are subject to change.

Changes in stated requirements must be highlighted in the issue discussion thread.

Coding Styles

To help enforce these practices, Codacy is evaluating this project. While these settings will likely require tweaks, they should provide a basis from which to analyze the codebase.

Spaces or Tabs

There exists an ongoing debate in nearly every development community for best practices.

This project uses spaces with the number specified according to this programming language style guide. A .editorconfig file is included to make this less burdensome on contributors by automatically converting the tab key to the appropriate number of spaces for the code type.

PHP

All PHP code should PSR-2 styling and conventions for all application code.

For test code, deviations from PSR-2 are permissible in order to increase the readability of the test.

A code linter will be employed for automated scanning of application code, it is a best practice to run this yourself as well. Suggestions are welcome for which linter best runs these verifications.

JavaScript

As with all things in the JavaScript community, this seems an ever-moving target. This project is willing to adopt any preferred convention as long as it is consistent and can be checked with a code linter.

Clone this wiki locally