Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
16 | function buildStubs(array $namesWithValues): StubSet |
||
17 | { |
||
18 | 81 | $stubSet = new StubSet(); |
|
19 | 81 | foreach ($namesWithValues as $name => $value) { |
|
20 | try { |
||
21 | 81 | $stub = buildStub($name, $value); |
|
22 | 1 | } catch (\Error $error) { |
|
23 | 1 | throw new InvalidArgumentException($error->getMessage()); |
|
24 | } |
||
25 | |||
26 | 80 | $stubSet->add($stub); |
|
27 | } |
||
28 | |||
29 | 80 | return $stubSet; |
|
30 | } |
||
31 |