Iterator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Knp\DictionaryBundle\Dictionary;
6
7
/**
8
 * @template E
9
 *
10
 * @extends Wrapper<E>
11
 */
12
final class Iterator extends Wrapper
13
{
14
    /**
15
     * @param \Traversable<mixed, E> $traversable
16
     */
17
    public function __construct(string $name, \Traversable $traversable)
18 10
    {
19
        parent::__construct(
20 10
            new Invokable(
21 10
                $name,
22 10
                static fn (): array => iterator_to_array($traversable)
23 10
            )
24 7
        );
25 10
    }
26
}
27