It is generally recommended to explicitly declare the visibility for methods.
Adding explicit visibility (private, protected, or public) is generally
recommend to communicate to other developers how, and from where this method
is intended to be used.
Loading history...
18
{
19
$this->name = $name;
20
}
21
22
public function setName($name)
23
{
24
$this->name = $name;
25
}
26
27
public function setDescription($description)
28
{
29
30
}
31
32
public function addArgument($name, $mode = NULL, $description = '', $default = NULL)
33
{
34
$this->arguments[] = [
35
'name' => $name,
36
'mode' => $mode,
37
'description' => $description,
38
'default' => $default,
39
];
40
}
41
42
public function addOption($name, $shortcut = NULL, $mode = NULL, $description = '', $default = NULL)
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.