Conditions | 2 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
1 | <?php |
||
23 | function metricPromisesToObjectStorage(array $promises): PromiseInterface |
||
24 | { |
||
25 | return all($promises)->then(function ($values) { |
||
26 | 9 | $storage = new \SplObjectStorage(); |
|
27 | 9 | foreach ($values as $value) { |
|
28 | 9 | $storage->attach($value); |
|
29 | } |
||
30 | 9 | return resolve($storage); |
|
31 | 9 | }); |
|
32 | } |
||
33 | |||
55 |