Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
95.24% covered (success)
95.24%
20 / 21
92.31% covered (success)
92.31%
12 / 13
CRAP
0.00% covered (danger)
0.00%
0 / 1
Benutzerrecht
95.24% covered (success)
95.24%
20 / 21
92.31% covered (success)
92.31%
12 / 13
14
0.00% covered (danger)
0.00%
0 / 1
 getBenutzerlfdnr
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setBenutzerlfdnr
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getIdent
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setIdent
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getLetzteraufruf
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setLetzteraufruf
75.00% covered (warning)
75.00%
3 / 4
0.00% covered (danger)
0.00%
0 / 1
2.06
 getLfdnr
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getPasswort
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setPasswort
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getProgramm
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setProgramm
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 isSperre
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setSperre
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Satag\AmicronEntityBundle\Entity;
6
7use Doctrine\DBAL\Types\Types;
8use Doctrine\ORM\Mapping as ORM;
9use Satag\AmicronEntityBundle\Traits\ModifierEntity;
10
11#[ORM\Entity]
12#[ORM\Table(name: 'BENRECHT')]
13#[ORM\Index(columns: ['ident'], name: 'BENRECHT_IDENT_IDX')]
14#[ORM\Index(columns: ['benutzerlfdnr'], name: 'BENRECHT_BENUTZERLFDNR_FK')]
15#[ORM\UniqueConstraint(name: 'BENRECHT_UK', columns: ['benutzerlfdnr', 'ident'])]
16class Benutzerrecht
17{
18    use ModifierEntity;
19
20    #[ORM\ManyToOne(targetEntity: Benutzer::class)]
21    #[ORM\JoinColumn(name: 'benutzerlfdnr', referencedColumnName: 'lfdnr')]
22    private ?Benutzer $benutzerlfdnr = null;
23
24    #[ORM\Column(name: 'ident', type: Types::INTEGER, nullable: false)]
25    private int $ident;
26
27    #[ORM\Column(name: 'letzteraufruf', type: Types::DATETIME_IMMUTABLE, nullable: true)]
28    private ?\DateTimeImmutable $letzteraufruf = null;
29
30    #[ORM\Column(name: 'lfdnr', type: Types::INTEGER, nullable: false)]
31    #[ORM\Id]
32    #[ORM\GeneratedValue(strategy: 'SEQUENCE')]
33    #[ORM\SequenceGenerator(sequenceName: 'GEN_LFDNR', allocationSize: 1, initialValue: 1)]
34    public private(set) ?int $lfdnr = null;
35
36    #[ORM\Column(name: 'passwort', type: Types::STRING, length: 35, nullable: true)]
37    private ?string $passwort = null;
38
39    #[ORM\Column(name: 'programm', type: Types::INTEGER, nullable: true)]
40    private ?int $programm = null;
41
42    #[ORM\Column(name: 'sperre', type: Types::BOOLEAN, length: 1, nullable: true)]
43    private ?bool $sperre = null;
44
45    public function getBenutzerlfdnr(): ?Benutzer
46    {
47        return $this->benutzerlfdnr;
48    }
49
50    public function setBenutzerlfdnr(?Benutzer $benutzerlfdnr): self
51    {
52        $this->benutzerlfdnr = $benutzerlfdnr;
53
54        return $this;
55    }
56
57    public function getIdent(): int
58    {
59        return $this->ident;
60    }
61
62    public function setIdent(int $ident): self
63    {
64        $this->ident = $ident;
65
66        return $this;
67    }
68
69    public function getLetzteraufruf(): ?\DateTimeImmutable
70    {
71        return $this->letzteraufruf;
72    }
73
74    public function setLetzteraufruf(\DateTimeImmutable|\DateTime|null $letzteraufruf): self
75    {
76        $this->letzteraufruf = $letzteraufruf instanceof \DateTime
77            ? \DateTimeImmutable::createFromInterface($letzteraufruf)
78            : $letzteraufruf;
79
80        return $this;
81    }
82
83    public function getLfdnr(): ?int
84    {
85        return $this->lfdnr;
86    }
87
88    public function getPasswort(): ?string
89    {
90        return $this->passwort;
91    }
92
93    public function setPasswort(?string $passwort): self
94    {
95        $this->passwort = $passwort;
96
97        return $this;
98    }
99
100    public function getProgramm(): ?int
101    {
102        return $this->programm;
103    }
104
105    public function setProgramm(?int $programm): self
106    {
107        $this->programm = $programm;
108
109        return $this;
110    }
111
112    public function isSperre(): bool
113    {
114        return (bool) $this->sperre;
115    }
116
117    public function setSperre(bool $sperre): self
118    {
119        $this->sperre = $sperre;
120
121        return $this;
122    }
123}