Conditions | 3 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
42 | protected function processItem(Template\Asset\Block $view, Entitizer\Entity\Menuitem $menuitem, int $children = 0) { |
||
43 | |||
44 | $view->icon = ((0 === $children) ? 'bars' : 'folder'); |
||
|
|||
45 | |||
46 | $view->position = $menuitem->position; |
||
47 | |||
48 | # Set browse button |
||
49 | |||
50 | $view->block('browse')->class = (('' !== $menuitem->link) ? 'primary' : 'disabled'); |
||
51 | |||
52 | $view->block('browse')->link = $menuitem->link; |
||
53 | } |
||
54 | } |
||
56 |
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.