Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
93.33% covered (success)
93.33%
14 / 15
90.00% covered (success)
90.00%
9 / 10
CRAP
0.00% covered (danger)
0.00%
0 / 1
Preisgruppe
93.33% covered (success)
93.33%
14 / 15
90.00% covered (success)
90.00%
9 / 10
11.04
0.00% covered (danger)
0.00%
0 / 1
 __construct
50.00% covered (danger)
50.00%
1 / 2
0.00% covered (danger)
0.00%
0 / 1
2.50
 getBezeichnung
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setBezeichnung
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getLfdnr
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getSortierung
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setSortierung
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 isAktiv
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 isBrutto
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setAktiv
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 setBrutto
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\BlameableEntity;
10use Satag\AmicronEntityBundle\Traits\BlameableEntityInterface;
11
12/**
13 * @see \Satag\AmicronEntityBundle\Tests\Entity\PreisgruppeTest
14 */
15#[ORM\Entity]
16#[ORM\HasLifecycleCallbacks]
17#[ORM\Table(name: 'PREISGRUPPEN')]
18#[ORM\Index(columns: ['bezeichnung'], name: 'PREISGRUPPEN_BEZEICHNUNG_UK')]
19#[ORM\UniqueConstraint(name: 'PREISGRUPPEN_BEZEICHNUNG_UK', columns: ['bezeichnung'])]
20class Preisgruppe implements BlameableEntityInterface
21{
22    use BlameableEntity;
23
24    #[ORM\Column(name: 'aktiv', type: 'boolean_int', nullable: true)]
25    private ?bool $aktiv = true;
26
27    #[ORM\Column(name: 'bezeichnung', type: Types::STRING, length: 80, unique: true, nullable: false)]
28    private string $bezeichnung = '';
29
30    #[ORM\Column(name: 'brutto', type: 'boolean_int', nullable: true)]
31    private ?bool $brutto = null;
32
33    #[ORM\Column(name: 'lfdnr', type: Types::INTEGER, nullable: false)]
34    #[ORM\Id]
35    #[ORM\GeneratedValue(strategy: 'SEQUENCE')]
36    #[ORM\SequenceGenerator(sequenceName: 'GEN_LFDNR', allocationSize: 1, initialValue: 1)]
37    public private(set) ?int $lfdnr = null;
38
39    #[ORM\Column(name: 'sortierung', type: Types::STRING, length: 2, nullable: true)]
40    private ?string $sortierung = null;
41
42    public function __construct(
43        ?string $bezeichnung = null
44    ) {
45        if ($bezeichnung !== null) {
46            $this->bezeichnung = $bezeichnung;
47        }
48    }
49
50    public function getBezeichnung(): string
51    {
52        return (string) $this->bezeichnung;
53    }
54
55    public function setBezeichnung(string $bezeichnung): self
56    {
57        $this->bezeichnung = $bezeichnung;
58
59        return $this;
60    }
61
62    public function getLfdnr(): ?int
63    {
64        return $this->lfdnr;
65    }
66
67    public function getSortierung(): ?string
68    {
69        return $this->sortierung;
70    }
71
72    public function setSortierung(string $sortierung): self
73    {
74        $this->sortierung = $sortierung;
75
76        return $this;
77    }
78
79    public function isAktiv(): ?bool
80    {
81        return $this->aktiv;
82    }
83
84    public function isBrutto(): ?bool
85    {
86        return $this->brutto;
87    }
88
89    public function setAktiv(?bool $aktiv): self
90    {
91        $this->aktiv = $aktiv;
92
93        return $this;
94    }
95
96    public function setBrutto(?bool $brutto): self
97    {
98        $this->brutto = $brutto;
99
100        return $this;
101    }
102}