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

ValueGeneratorMetadata::getSequencingGenerator()   B

Complexity

Conditions 6
Paths 6

Size

Total Lines 33
Code Lines 21

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 13
CRAP Score 7.1338

Importance

Changes 0
Metric Value
cc 6
eloc 21
nc 6
nop 1
dl 0
loc 33
ccs 13
cts 19
cp 0.6842
crap 7.1338
rs 8.9617
c 0
b 0
f 0
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