Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 1.17 KB

File metadata and controls

27 lines (17 loc) · 1.17 KB

Coding Standards

HumHub follows PSR-12 (extending PSR-1), with a few additional rules borrowed from the Yii core code style.

The configuration is checked into the repository:

Run the formatter before submitting a pull request:

vendor/bin/php-cs-fixer fix

CI runs the same fixer in --dry-run mode and rejects PRs that diverge from the ruleset.

JavaScript

JavaScript code under static/js/ follows the existing patterns — 4-space indent, no semicolons omitted, humhub.module(...) registration. There is no automated formatter for JS at the moment; match the surrounding file.

Commit style

  • Imperative subject ("Fix X" not "Fixed X" or "Fixes X")
  • Subject line under ~70 characters
  • Body explains why when it isn't obvious from the diff