| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public static function handle($response, $model, $type) |
||
|
|
|||
| 22 | { |
||
| 23 | if (!method_exists($response, 'getToken')) { |
||
| 24 | return null; |
||
| 25 | } |
||
| 26 | $token = $response->getToken(); |
||
| 27 | if (!($token instanceof TokenInterface)) { |
||
| 28 | return null; |
||
| 29 | } |
||
| 30 | return PaymentsModels::tokens()->findOrCreateForMethod($model->getPaymentMethod(), $token); |
||
| 31 | } |
||
| 32 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.