Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public function __construct(Route $route = null, $method, $uri, $translation, array $parameters = array(), $name = null) |
||
26 | { |
||
27 | $this->uri = $uri; |
||
28 | $this->name = $name; |
||
29 | $this->route = $route; |
||
|
|||
30 | $this->method = $method; |
||
31 | $this->translation = $translation; |
||
32 | $this->parameters = $parameters; |
||
33 | } |
||
34 | |||
59 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: