| 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 |
||
| 44 | protected function findBaseModel() |
||
| 45 | { |
||
| 46 | $availableTariffs = Tariff::perform('GetAvailableInfo', ['type' => $this->type], true); |
||
| 47 | if (empty($availableTariffs)) { |
||
| 48 | throw new ForbiddenHttpException('No available domain tariffs found'); |
||
| 49 | } |
||
| 50 | |||
| 51 | $query = Tariff::find()->joinWith('resources')->prepare(); |
||
|
|
|||
| 52 | $this->baseTariff = reset($query->populate($availableTariffs)); |
||
| 53 | } |
||
| 54 | |||
| 60 |
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.