Conditions | 4 |
Paths | 4 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
8 | 4 | public function execute(TransactionData $transactionData, $argument = null) |
|
9 | { |
||
10 | 4 | $argument = (integer) $argument ?: 200; |
|
11 | 4 | if ($argument < 100 || $argument >= 600) { |
|
12 | 1 | throw new \RuntimeException('Invalid status code: ' . $argument); |
|
13 | } |
||
14 | 3 | return $transactionData->setResponse( |
|
15 | 3 | $transactionData->getResponse()->withStatus($argument) |
|
16 | 3 | ); |
|
17 | } |
||
18 | } |
||
19 |