| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 6 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function install(IOInterface $io, $packageName) { |
||
|
|
|||
| 11 | $model = ApplicationQuery::create()->findOneByName($packageName); |
||
| 12 | |||
| 13 | if ($model === null) { |
||
| 14 | $io->write('[Keeko] Install Application: ' . $packageName); |
||
| 15 | |||
| 16 | $package = $this->service->getPackageManager()->getPackage($packageName); |
||
| 17 | $keeko = $package->getKeeko(); |
||
| 18 | |||
| 19 | if ($keeko->isApp()) { |
||
| 20 | $pkg = $keeko->getApp(); |
||
| 21 | |||
| 22 | $model = new Application(); |
||
| 23 | $model->setClassName($pkg->getClass()); |
||
| 24 | $this->updatePackage($model, $pkg); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | return $model; |
||
| 29 | } |
||
| 30 | |||
| 38 | } |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.