| Conditions | 5 |
| Paths | 10 |
| Total Lines | 21 |
| Code Lines | 13 |
| 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 | foreach ($addons as $addon) { |
||
| 46 | /** @var Addon $addon */ |
||
| 47 | $this->log(sprintf('Building "%s" (#%d)', $addon->Name, $addon->ID)); |
||
|
|
|||
| 48 | try { |
||
| 49 | $this->builder->build($addon); |
||
| 50 | } catch (RuntimeException $e) { |
||
| 51 | $this->log('Error: ' . $e->getMessage()); |
||
| 52 | } |
||
| 53 | |||
| 54 | if ($addon->ID) { |
||
| 55 | $addon->BuildQueued = false; |
||
| 56 | $addon->write(); |
||
| 57 | } |
||
| 58 | } |
||
| 59 | } |
||
| 60 | |||
| 69 |
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@propertyannotation 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.