Conditions | 4 |
Paths | 3 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function evaluate($data) |
||
14 | { |
||
15 | $inherit = $data->route->getConfig('inherit'); |
||
|
|||
16 | |||
17 | if ($inherit !== null) { |
||
18 | $routes = $data->getEnforcer()->getConfig(); |
||
19 | |||
20 | // Find the one to inherit from |
||
21 | foreach ($routes as $route) { |
||
22 | if ($route->getConfig('name') === $inherit) { |
||
23 | $data->getEnforcer()->addMatch($route); |
||
24 | return true; |
||
25 | } |
||
26 | } |
||
27 | } |
||
28 | return false; |
||
29 | } |
||
30 | } |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.