| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 13 |
| Ratio | 100 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | 6 | public function __invoke(&$params, string $track) |
|
| 11 | { |
||
| 12 | // works only on Error track |
||
| 13 | 6 | if ($track == Railway::TRACK_FAILURE) { |
|
| 14 | 4 | $response = call_user_func($this->function, $params); |
|
| 15 | 4 | $response = $this->normalizeStepResponse($response); |
|
| 16 | // does not respect function return and always back to error track |
||
| 17 | 4 | $response['type'] = RESPONSE_TYPE_ERROR; |
|
| 18 | 4 | return $response; |
|
| 19 | } else { |
||
| 20 | 2 | $this->skip(); |
|
| 21 | } |
||
| 22 | 2 | } |
|
| 23 | } |
||
| 24 |