Passed
Pull Request — master (#849)
by Maxim
06:23
created

Elements::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 8
ccs 7
cts 7
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Reactor\Aggregator;
6
7
use Spiral\Reactor\Aggregator;
8
use Spiral\Reactor\ClassDeclaration;
9
use Spiral\Reactor\EnumDeclaration;
10
use Spiral\Reactor\InterfaceDeclaration;
11
use Spiral\Reactor\TraitDeclaration;
12
13
/**
14
 * Classes, interfaces, traits, enums aggregation.
15
 *
16
 * @extends Aggregator<ClassDeclaration|InterfaceDeclaration|TraitDeclaration|EnumDeclaration>
17
 */
18
final class Elements extends Aggregator
19
{
20 7
    public function __construct(array $elements)
21
    {
22 7
        parent::__construct([
23 7
            ClassDeclaration::class,
24 7
            InterfaceDeclaration::class,
25 7
            TraitDeclaration::class,
26 7
            EnumDeclaration::class,
27 7
        ], $elements);
28
    }
29
}
30