Passed
Push — master ( 2279c5...1edf79 )
by Mr
06:36
created

ProjectionMap::toNative()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 4
c 0
b 0
f 0
nc 2
nop 0
dl 0
loc 7
ccs 0
cts 7
cp 0
crap 6
rs 10
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of the daikon-cqrs/read-model project.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace Daikon\ReadModel\Projection;
10
11
use Daikon\DataStructure\TypedMapTrait;
0 ignored issues
show
Bug introduced by
The type Daikon\DataStructure\TypedMapTrait was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
13
final class ProjectionMap implements ProjectionMapInterface
14
{
15
    use TypedMapTrait;
16
17
    public function __construct(iterable $projections = [])
18
    {
19
        $this->init($projections, [ProjectionInterface::class]);
20
    }
21
22
    public function toNative(): array
23
    {
24
        $projections = [];
25
        foreach ($this as $key => $projection) {
26
            $projections[$key] = $projection->toNative();
27
        }
28
        return $projections;
29
    }
30
}
31