| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function findByOrderIdOrAltapayId($id): ?Payment |
||
| 13 | { |
||
| 14 | /** @var Payment $payment */ |
||
| 15 | $payment = $this->findOneBy([ |
||
| 16 | 'orderId' => $id, |
||
| 17 | ]); |
||
| 18 | |||
| 19 | if (!$payment) { |
||
| 20 | /** @var Payment $payment */ |
||
| 21 | $payment = $this->findOneBy([ |
||
|
|
|||
| 22 | 'altapayId' => $id, |
||
| 23 | ]); |
||
| 24 | } |
||
| 25 | |||
| 26 | return $payment; |
||
| 27 | } |
||
| 28 | |||
| 42 |
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.