Conditions | 4 |
Paths | 5 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
27 | 18 | public function __construct(array $stages = [], ProcessorInterface $processor = null) |
|
28 | { |
||
29 | 18 | foreach ($stages as $stage) { |
|
30 | 6 | if (false === is_callable($stage)) { |
|
31 | 2 | throw new InvalidArgumentException('All stages should be callable.'); |
|
32 | } |
||
33 | 16 | } |
|
34 | |||
35 | 16 | $this->stages = $stages; |
|
36 | 16 | $this->processor = $processor ?: new FingersCrossedProcessor; |
|
37 | 16 | } |
|
38 | |||
83 |