| Total Complexity | 3 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class PipelineBuilder implements PipelineBuilderInterface |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var callable[] |
||
| 10 | */ |
||
| 11 | private $stages = []; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @return self |
||
| 15 | */ |
||
| 16 | 4 | public static function init(): PipelineBuilderInterface |
|
| 17 | { |
||
| 18 | 4 | return new self(); |
|
| 19 | } |
||
| 20 | 4 | ||
| 21 | /** |
||
| 22 | * @return self |
||
| 23 | 2 | */ |
|
| 24 | public function add(callable $stage): PipelineBuilderInterface |
||
| 25 | 2 | { |
|
| 26 | $this->stages[] = $stage; |
||
| 27 | |||
| 28 | return $this; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function build(ProcessorInterface $processor = null): PipelineInterface |
||
| 34 | } |
||
| 35 | } |
||
| 36 |