Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
53 | protected function findBaseTariffs() |
||
54 | { |
||
55 | $availableTariffs = Tariff::perform('GetAvailableInfo', ['type' => $this->type], true); |
||
56 | |||
57 | if (empty($availableTariffs)) { |
||
58 | throw new ForbiddenHttpException('No available tariffs found'); |
||
59 | } |
||
60 | |||
61 | $query = Tariff::find()->joinWith('resources')->prepare(); |
||
|
|||
62 | $this->baseTariffs = $query->populate($availableTariffs); |
||
63 | } |
||
64 | |||
78 |
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.