Skip to content

Commit

Permalink
docs(code): Clarify interface naming convention
Browse files Browse the repository at this point in the history
Fixes #8293
  • Loading branch information
ewinslow committed Jun 19, 2015
1 parent 642873b commit de03d37
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/contribute/code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,18 @@ Use self-documenting variable names. ``$group_guids`` is better than ``$array``

Avoid double-negatives. Prefer ``$enable = true`` to ``$disable = false``.

Interface names
^^^^^^^^^^^^^^^

Use the pattern `Elgg\{Namespace}\{Name}`.

Do not include an `I` prefix or an `Interface` suffix.

We do not include any prefix or suffix so that we're encouraged to:

* name implementation classes more descriptively (the "default" name is taken).
* type-hint on interfaces, because that is the shortest, easiest thing to do.

Functions
^^^^^^^^^

Expand Down

0 comments on commit de03d37

Please sign in to comment.