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...
28
{
29
7
$this->generator = $generator;
30
7
$this->request = $request;
31
7
}
32
33
/**
34
* @return callable
35
*/
36
3
protected function generator()
37
{
38
3
return $this->generator;
39
}
40
41
/**
42
* @param null|string $name
43
* @return string
44
*/
45
3
protected function name($name = null)
46
{
47
3
return $name ?? $this->request->name();
48
}
49
50
/**
51
* @param array $options
52
* @return array
53
*/
54
2
protected function options(array $options = [])
55
{
56
return $options + [
57
2
Arg::HOST => $this->request->host(),
58
2
Arg::PORT => $this->request->port(),
59
2
Arg::SCHEME => $this->request->scheme()
60
];
61
}
62
63
/**
64
* @param $name
65
* @param array $params
66
* @return array
67
*/
68
protected function params($name, array $params = [])
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.
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.