Failed Conditions
Pull Request — develop (#6684)
by Michael
61:07
created

AssociationIdentifier::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Tests\Models\ValueGenerators;
6
7
use Doctrine\ORM\Annotation as ORM;
8
9
/**
10
 * @ORM\Entity
11
 * @ORM\Table("vg_association_identifier")
12
 */
13
class AssociationIdentifier
14
{
15
    /**
16
     * @ORM\Column(type="string")
17
     * @ORM\Id
18
     * @ORM\GeneratedValue("CUSTOM")
19
     * @ORM\CustomIdGenerator("Doctrine\Tests\Models\ValueGenerators\FooGenerator")
20
     * @var string|null
21
     */
22
    private $id;
23
24
    /**
25
     * @ORM\OneToOne(targetEntity="AssociationIdentifierTarget", cascade={"persist"})
26
     * @ORM\Id
27
     * @var AssociationIdentifierTarget
28
     */
29
    private $target;
30
31
    /**
32
     * @ORM\Column(type="string")
33
     * @ORM\GeneratedValue("CUSTOM")
34
     * @ORM\CustomIdGenerator("Doctrine\Tests\Models\ValueGenerators\BarGenerator")
35
     * @var string|null
36
     */
37
    private $regular;
38
39
    public function __construct()
40
    {
41
        $this->target = new AssociationIdentifierTarget();
42
    }
43
44
    public function getTarget() : AssociationIdentifierTarget
45
    {
46
        return $this->target;
47
    }
48
49
    public function getId() : ?string
50
    {
51
        return $this->id;
52
    }
53
54
    public function getRegular() : ?string
55
    {
56
        return $this->regular;
57
    }
58
}
59