| Total Complexity | 6 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class Pipeline |
||
| 8 | { |
||
| 9 | use Configurable; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var \Closure[] |
||
| 13 | */ |
||
| 14 | protected $pipes = []; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Pipeline constructor. |
||
| 18 | * |
||
| 19 | * @param array $config |
||
| 20 | */ |
||
| 21 | public function __construct($config = []) |
||
| 24 | } |
||
| 25 | |||
| 26 | public function pushPipe($pipe, $options = []) |
||
| 27 | { |
||
| 28 | if ($pipe instanceof Pipeable) { |
||
| 29 | $this->pipes[] = $pipe->pipe($options); |
||
| 30 | } elseif ($pipe instanceof \Closure) { |
||
| 31 | $this->pipes[] = $pipe; |
||
| 32 | } |
||
| 33 | |||
| 34 | return $this; |
||
| 35 | } |
||
| 36 | |||
| 37 | public function flow($data = null) |
||
| 45 | } |
||
| 46 | } |
||
| 47 |