Passed
Push — add-traversable-extensions ( 4b7eb0 )
by Antoine
03:06
created

CollectionExtensions   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 12
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getIterator() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace ApiPlatform\Core\Bridge\Doctrine\Orm;
15
16
class CollectionExtensions implements \IteratorAggregate
17
{
18
    private $collectionExtensions;
19
20
    public function __construct(array $collectionExtensions)
21
    {
22
        $this->collectionExtensions = $collectionExtensions;
23
    }
24
25
    public function getIterator(): \Traversable
26
    {
27
        return new \ArrayIterator($this->collectionExtensions);
28
    }
29
}
30