| Conditions | 6 |
| Paths | 7 |
| Total Lines | 28 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 16 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | 5 | public function execute($request) |
|
| 18 | { |
||
| 19 | 5 | RequestNotSupportedException::assertSupports($this, $request); |
|
| 20 | |||
| 21 | 5 | $details = ArrayObject::ensureArrayObject($request->getModel()); |
|
| 22 | |||
| 23 | 5 | if (isset($details['RC']) === false) { |
|
| 24 | 1 | $request->markNew(); |
|
| 25 | |||
| 26 | 1 | return; |
|
| 27 | } |
||
| 28 | |||
| 29 | 4 | if ($details['RC'] === '00') { |
|
| 30 | 3 | if (isset($details['RRN']) === true) { |
|
| 31 | isset($details['MACD']) === true || isset($details['TXNAMOUNT']) === true |
||
| 32 | 2 | ? $this->markCaptured() |
|
|
|
|||
| 33 | : $request->markCanceled(); |
||
| 34 | 1 | ||
| 35 | 1 | return; |
|
| 36 | 3 | } |
|
| 37 | 1 | ||
| 38 | $request->markRefunded(); |
||
| 39 | 1 | ||
| 40 | return; |
||
| 41 | } |
||
| 42 | 3 | ||
| 43 | 2 | $request->markFailed(); |
|
| 44 | } |
||
| 45 | 1 | ||
| 56 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.