| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function perform() |
||
| 29 | { |
||
| 30 | $package = $this->getObject(); |
||
| 31 | if (!$package->ID) throw new Exception('Package not specified'); |
||
| 32 | |||
| 33 | $builder = Injector::inst()->get('AddonBuilder'); |
||
| 34 | |||
| 35 | $builder->build($package); |
||
| 36 | |||
| 37 | $package->BuildQueued = false; |
||
| 38 | $package->write(); |
||
| 39 | |||
| 40 | $this->isComplete = true; |
||
| 41 | } |
||
| 42 | |||
| 83 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: