# Interfaces Spec
Interfaces describe the public methods implemented by a given class. In Chevere, all components must define their own interface.
- Define a descriptive name
- Named with
- Located at
Each interface should describe a unique public procedure that may be implemented by one or several classes.
Parameters and return types must be typed against an scalar or an interface.
Parameters and return types should not be typed against concrete implementations
# Method naming
Accessors refers to methods that access to an object property.
Accessors must be nouns and named as the property it retrieves. For example, the method
something should be used to retrieve the value of
public function something(): string;
Accessors = nouns
Actions refers to when the object must do something. These actions could return anything or just
A verb should be prefixed for any given action. For example,
Actions = verbs
In the example below, we do the evolution.
public function doTheEvolution(): void;
Refer to Immutability Standard.
Immutables refers to methods that returns an altered copy of the original object.
with prefix should be used in immutable methods. For example,
Immutables = with*
Conditionals refers to methods that returns boolean, usually for object flagging.
is prefix must be used in methods returning