| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | protected function findBaseModel() |
||
| 38 | { |
||
| 39 | $availableTariffs = Tariff::perform('GetAvailableInfo', ['type' => $this->type], true); |
||
| 40 | if (empty($availableTariffs)) { |
||
| 41 | throw new ForbiddenHttpException('No available domain tariffs found'); |
||
| 42 | } |
||
| 43 | |||
| 44 | $query = Tariff::find()->joinWith('resources')->prepare(); |
||
|
|
|||
| 45 | $this->baseModel = reset($query->populate($availableTariffs)); |
||
| 46 | } |
||
| 47 | |||
| 53 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.