| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 1 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | 3 | public function execute(TransactionData $transactionData, $argument = null) |
|
| 15 | { |
||
| 16 | 3 | $middleware = $argument->getInstance(); |
|
|
|
|||
| 17 | |||
| 18 | 3 | $transactionData->setResponse( |
|
| 19 | 3 | $middleware( |
|
| 20 | 3 | $transactionData->getRequest(), |
|
| 21 | 3 | $transactionData->getResponse(), |
|
| 22 | 3 | $argument->getArgument() |
|
| 23 | 3 | ) |
|
| 24 | 3 | ); |
|
| 25 | 3 | } |
|
| 26 | } |
||
| 27 |
If a variable is not always an object, we recommend to add an additional type check to ensure your method call is safe: