Failed Conditions
Push — master ( fa7802...d60694 )
by Guilherme
09:27
created

ValueGeneratorMetadata   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 84.62%

Importance

Changes 0
Metric Value
eloc 10
c 0
b 0
f 0
dl 0
loc 38
ccs 11
cts 13
cp 0.8462
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getType() 0 3 1
A setDeclaringProperty() 0 3 1
A getDeclaringProperty() 0 3 1
A getGenerator() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\ORM\Mapping;
6
7
use Doctrine\ORM\Sequencing\Generator;
8
9
class ValueGeneratorMetadata
10
{
11
    /** @var Property */
12
    protected $declaringProperty;
13
14
    /** @var string */
15
    protected $type;
16
17
    /** @var Generator\Generator */
18
    protected $generator;
19
20
    /**
21
     * @param mixed[] $definition
22
     */
23 314
    public function __construct(string $type, Generator\Generator $generator)
24
    {
25 314
        $this->type      = $type;
26 314
        $this->generator = $generator;
27 314
    }
28
29
    public function getDeclaringProperty() : Property
30
    {
31
        return $this->declaringProperty;
32
    }
33
34 314
    public function setDeclaringProperty(Property $declaringProperty) : void
35
    {
36 314
        $this->declaringProperty = $declaringProperty;
37 314
    }
38
39 975
    public function getType() : string
40
    {
41 975
        return $this->type;
42
    }
43
44 296
    public function getGenerator() : Generator\Generator
45
    {
46 296
        return $this->generator;
47
    }
48
}
49