| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 8 |
| Ratio | 100 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | 6 | public function __invoke(&$params, string $track) |
|
| 12 | { |
||
| 13 | 6 | $response = $this->normalizeStepResponse(call_user_func($this->function, $params)); |
|
| 14 | // run on any track, but not change it to OK, if strated on Error |
||
| 15 | 6 | $type = ($track == Railway::TRACK_FAILURE) ? RESPONSE_TYPE_ERROR : $response['type']; |
|
| 16 | 6 | $response['type'] = $type; |
|
| 17 | 6 | return $response; |
|
| 18 | } |
||
| 19 | } |
||
| 20 |