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

DatabaseField   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 3
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace HDNET\Autoloader\Annotation;
6
7
/**
8
 * @Annotation
9
 * @Target({"PROPERTY"})
10
 */
11
class DatabaseField
12
{
13
    /**
14
     * @var string
15
     */
16
    public $type;
17
    /**
18
     * @var string
19
     */
20
    public $sql;
21
22
    /**
23
     * @throws \InvalidArgumentException
24
     */
25
    public function __construct(array $values)
26
    {
27
        if (isset($values['type'])) {
28
            $this->type = $values['type'];
29
        }
30
        if (isset($values['sql'])) {
31
            $this->sql = $values['sql'];
32
        }
33
    }
34
}
35