ComposeGenerators   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 3
c 2
b 0
f 0
dl 0
loc 13
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 4 2
1
<?php
2
3
namespace ComposerRequireChecker\GeneratorUtil;
4
5
use Traversable;
6
7
final class ComposeGenerators
8
{
9
    /**
10
     * @template TKey
11
     * @template TValue
12
     *
13
     * @param Traversable<TKey, TValue> ...$generators
14
     * @return Traversable<int, TValue>
15
     */
16 8
    public function __invoke(Traversable ...$generators): Traversable
17
    {
18 8
        foreach ($generators as $generator) {
19 8
            yield from $generator;
20
        }
21 8
    }
22
}
23