Completed
Push — master ( 05a043...a79f71 )
by Tim
15:11
created

SignalName::__construct()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 3
nc 3
nop 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace HDNET\Autoloader\Annotation;
6
7
/**
8
 * @Annotation
9
 * @Target({"METHOD"})
10
 */
11
class SignalName
12
{
13
    /**
14
     * @var string
15
     */
16
    public $argumentName;
17
18
    /**
19
     * @throws \InvalidArgumentException
20
     */
21
    public function __construct(array $values)
22
    {
23
        if (isset($values['value'])) {
24
            $this->argumentName = $values['value'];
25
        } elseif (isset($values['argumentName'])) {
26
            $this->argumentName = $values['argumentName'];
27
        }
28
    }
29
}
30