Test Failed
Push — dev ( d9ea74...46b33e )
by Nico
09:52
created

RpgPlotMemberArchiv::getRpgPlot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Orm\Entity;
6
7
use Doctrine\ORM\Mapping\Column;
8
use Doctrine\ORM\Mapping\Entity;
9
use Doctrine\ORM\Mapping\GeneratedValue;
10
use Doctrine\ORM\Mapping\Id;
11
use Doctrine\ORM\Mapping\JoinColumn;
12
use Doctrine\ORM\Mapping\ManyToOne;
13
use Doctrine\ORM\Mapping\Table;
14
use Doctrine\ORM\Mapping\UniqueConstraint;
15
16
/**
17
 * @Entity(repositoryClass="Stu\Orm\Repository\RpgPlotMemberArchivRepository")
18
 * @Table(
19
 *     name="stu_plots_members_archiv",
20
 *     uniqueConstraints={@UniqueConstraint(name="plot_archiv_user_idx", columns={"plot_id", "user_id"})}
21
 * )
22
 */
23
class RpgPlotMemberArchiv implements RpgPlotMemberArchivInterface
24
{
25
    /**
26
     * @Id
27
     * @Column(type="integer")
28
     * @GeneratedValue(strategy="IDENTITY")
29
     *
30
     */
31
    private int $id;
32
33
    /**
34
     * @Column(type="string", nullable=true)
35
     *
36
     */
37
    private ?string $version = '';
38
39
    /**
40
     * @Column(type="integer", nullable=true)
41
     * 
42
     */
43
    private ?int $former_id = 0;
44
45
    /**
46
     * @Column(type="integer", nullable=true)
47
     *
48
     */
49
    private ?int $plot_id = 0;
50
51
    /**
52
     * @Column(type="integer", nullable=true)
53
     *
54
     */
55
    private ?int $user_id = 0;
56
57
    /**
58
     *
59
     * @ManyToOne(targetEntity="RpgPlotArchiv", inversedBy="members")
60
     * @JoinColumn(name="plot_id", referencedColumnName="id", onDelete="CASCADE")
61
     */
62
    private RpgPlotArchivInterface $rpgPlot;
63
64
    public function getId(): int
65
    {
66
        return $this->id;
67
    }
68
69
    public function getVersion(): ?string
70
    {
71
        return $this->version;
72
    }
73
74
    public function getFormerId(): int
75
    {
76
        return $this->former_id;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->former_id could return the type null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
77
    }
78
79
    public function getPlotId(): int
80
    {
81
        return $this->plot_id;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->plot_id could return the type null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
82
    }
83
84
    public function getUserId(): int
85
    {
86
        return $this->user_id;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->user_id could return the type null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
87
    }
88
89
    public function getRpgPlot(): RpgPlotArchivInterface
90
    {
91
        return $this->rpgPlot;
92
    }
93
94
    public function setRpgPlot(RpgPlotArchivInterface $rpgPlot): RpgPlotMemberArchivInterface
95
    {
96
        $this->rpgPlot = $rpgPlot;
97
98
        return $this;
99
    }
100
}
101