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...
20
{
21
$error = $this->isValidError($name);
22
23
if ($error) {
24
throw $error;
25
}
26
27
return $name;
28
}
29
30
/**
31
* Returns an Error if a name is invalid.
32
*
33
* @param string $name
34
* @param mixed|null $node
35
* @return ValidationException
36
* @throws InvariantException
37
*/
38
function isValidError(string $name, $node = null): ?ValidationException
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.