# 🎛 Interfaces Spec
Interfaces describe the public methods implemented by a given class. In Chevere, all components must define their own interface.
Check thee Interfaces Reference to learn about all the interfaces available.
- 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 name of 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;
Immutables refers to methods that returns an altered copy of the original object.
with prefix is associated with immutables. For example,
🧔🏾 Immutables = with*
More about immutables at Immutability.
Conditionals refers to methods that returns boolean, usually for object flagging.
is prefix is used in methods returning