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

Elements   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 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