Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4.5923 |
Changes | 0 |
1 | <?php |
||
17 | 10 | public function add($process) |
|
18 | { |
||
19 | 10 | if (is_array($process)) { |
|
20 | 10 | foreach ($process as $p) { |
|
21 | 9 | $this->add($p); |
|
22 | 10 | } |
|
23 | 10 | } elseif (!$process instanceof ChainProcessInterface) { |
|
24 | throw new \RuntimeException(sprintf( |
||
25 | 'Expect to be instance of ChainProcessInterface or array but got %s', |
||
26 | get_class($process) |
||
27 | )); |
||
28 | } else { |
||
29 | 9 | $this->processes[] = $process; |
|
30 | } |
||
31 | 10 | } |
|
32 | |||
41 |