Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 6 |
CRAP | |
0.00% |
0 / 1 |
Throttling | |
0.00% |
0 / 6 |
|
0.00% |
0 / 6 |
42 | |
0.00% |
0 / 1 |
getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getEventName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setEventName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getLastOccurrence | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setLastOccurrence | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace Olz\Entity; |
4 | |
5 | use Doctrine\ORM\Mapping as ORM; |
6 | use Olz\Repository\ThrottlingRepository; |
7 | |
8 | #[ORM\Table(name: 'throttlings')] |
9 | #[ORM\UniqueConstraint(name: 'event_name_index', columns: ['event_name'])] |
10 | #[ORM\Entity(repositoryClass: ThrottlingRepository::class)] |
11 | class Throttling { |
12 | #[ORM\Column(type: 'string', nullable: false)] |
13 | private string $event_name; |
14 | |
15 | #[ORM\Column(type: 'datetime', nullable: true)] |
16 | private ?\DateTime $last_occurrence; |
17 | |
18 | #[ORM\Id] |
19 | #[ORM\Column(type: 'bigint', nullable: false)] |
20 | #[ORM\GeneratedValue] |
21 | private int|string $id; |
22 | |
23 | public function getId(): int|string { |
24 | return intval($this->id); |
25 | } |
26 | |
27 | public function setId(int|string $new_id): void { |
28 | $this->id = $new_id; |
29 | } |
30 | |
31 | public function getEventName(): string { |
32 | return $this->event_name; |
33 | } |
34 | |
35 | public function setEventName(string $new_event_name): void { |
36 | $this->event_name = $new_event_name; |
37 | } |
38 | |
39 | public function getLastOccurrence(): ?\DateTime { |
40 | return $this->last_occurrence; |
41 | } |
42 | |
43 | public function setLastOccurrence(?\DateTime $new_last_occurrence): void { |
44 | $this->last_occurrence = $new_last_occurrence; |
45 | } |
46 | } |