AbstractEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Arp\EventDispatcher\Event;
6
7
abstract class AbstractEvent implements ParametersAwareInterface
8
{
9
    use ParametersAwareTrait;
10
11
    /**
12
     * @param ParametersInterface<mixed>|iterable<mixed> $params
13
     */
14
    public function __construct(iterable $params = [])
15
    {
16
        if (!$params instanceof ParametersInterface) {
17
            $params = new Parameters(is_array($params) ? $params : []);
18 4
        }
19
20 4
        $this->setParameters($params);
21 4
    }
22
}
23