Best practices

Verze:

18. 06. 2025

Zodpovědná osoba:

Dominik Šlechta

Every property SHOULD have a getter and setter.

In code variable values MAY be set up in self const or enum depending on case.

Hard-coded values MUST be avoided if possible.

Magic properties MUST be avoided if possible.

Caller MUST obey callee setup.

Function arguments MUST be typed if possible.

Function return argument MUST be typed if possible.

Function SHOULD obey “Low coupling, High cohesion” principle

Function SHOULD be as much independent as possible (i.e. use as few arguments as possible)

Key values MUST have unique declaration (no, position of item is not a unique value).

All potential multi-plugins (plugin that probable be replaced) MUST have manager;  all plugins SHOULD have manager.

All configuration values MUST obey 1:M (one declaration, many references).

Inline operators SHOULD NOT be declared more than once in block.

Every folder worker MUST have folder existence checker, otherwise MUST be documented accordingly to state.