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.
It is recommend to declare an explicit visibility for __construct.
Generally, we recommend to declare visibility for all methods in your source code.
This has the advantage of clearly communication to other developers, and also
yourself, how this method should be consumed.
If you are not sure which visibility to choose, it is a good idea to start with
the most restrictive visibility, and then raise visibility as needed, i.e.
start with private, and only raise it to protected if a sub-class needs
to have access, or public if an external class needs access.
Loading history...
29
{
30
$this->actionRegex = $actionRegex;
31
}
32
33
/**
34
* Apply Plugin's services to the existing Container
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.