| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function charge(ChargeableInterface $object, $amount, $currency, $paymentMethod = null) |
||
| 26 | { |
||
| 27 | if (!$paymentMethod) { |
||
| 28 | $paymentMethod = $this->chargeWithStripe($object); |
||
|
|
|||
| 29 | } |
||
| 30 | |||
| 31 | if (!$paymentMethod) { |
||
| 32 | $paymentMethod = $this->chargeWithPaypal($object); |
||
| 33 | } |
||
| 34 | |||
| 35 | // run the right task for the available method |
||
| 36 | return $paymentMethod->run($object, $amount, $currency); |
||
| 37 | } |
||
| 38 | |||
| 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.