Conditions | 4 |
Paths | 6 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | public function run($request) |
||
40 | { |
||
41 | $addons = Addon::get(); |
||
42 | if ($request->getVar('addons')) { |
||
43 | $addons = $addons->filter('Name', explode(',', $request->getVar('addons'))); |
||
44 | } |
||
45 | |||
46 | foreach ($addons as $addon) { |
||
47 | /** @var Addon $addon */ |
||
48 | $this->log(sprintf('Building "%s"', $addon->Name)); |
||
|
|||
49 | try { |
||
50 | $this->builder->build($addon); |
||
51 | } catch (RuntimeException $e) { |
||
52 | $this->log('Error: ' . $e->getMessage()); |
||
53 | } |
||
54 | |||
55 | $addon->BuildQueued = false; |
||
56 | $addon->write(); |
||
57 | } |
||
58 | } |
||
59 | |||
68 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read 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.