| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 44 | public function process($payload = null) |
||
| 45 | { |
||
| 46 | if (empty($this->stages)) { |
||
| 47 | return null; |
||
| 48 | } |
||
| 49 | |||
| 50 | // Call all stages which depend only on the input |
||
| 51 | $graph = new Graph($this->stages, new Sequential()); |
||
| 52 | |||
| 53 | $results = $graph->process($payload); |
||
| 54 | |||
| 55 | end($this->stages); |
||
| 56 | $lastStageIndex = key($this->stages); |
||
| 57 | reset($this->stages); |
||
| 58 | |||
| 59 | return $results->output($lastStageIndex); |
||
| 60 | } |
||
| 61 | |||
| 70 |