Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 11
0.00% covered (danger)
0.00%
0 / 11
CRAP
0.00% covered (danger)
0.00%
0 / 1
AuthRequest
0.00% covered (danger)
0.00%
0 / 11
0.00% covered (danger)
0.00%
0 / 11
156
0.00% covered (danger)
0.00%
0 / 1
 getId
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 setId
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getIpAddress
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setIpAddress
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getTimestamp
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setTimestamp
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getAction
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setAction
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getUsername
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setUsername
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 testOnlyGetField
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace Olz\Entity;
4
5use Doctrine\ORM\Mapping as ORM;
6use Olz\Entity\Common\TestableInterface;
7use Olz\Repository\AuthRequestRepository;
8
9#[ORM\Table(name: 'auth_requests')]
10#[ORM\Index(name: 'ip_address_timestamp_index', columns: ['ip_address', 'timestamp'])]
11#[ORM\Entity(repositoryClass: AuthRequestRepository::class)]
12class AuthRequest implements TestableInterface {
13    #[ORM\Column(type: 'string', length: 40, nullable: false)]
14    public string $ip_address;
15
16    #[ORM\Column(type: 'datetime', nullable: true)]
17    public ?\DateTime $timestamp;
18
19    #[ORM\Column(type: 'string', length: 31, nullable: false)]
20    public string $action;
21
22    #[ORM\Column(type: 'text', nullable: false)]
23    public string $username;
24
25    #[ORM\Id]
26    #[ORM\Column(type: 'bigint', nullable: false)]
27    #[ORM\GeneratedValue]
28    private int|string $id;
29
30    public function getId(): ?int {
31        return isset($this->id) ? intval($this->id) : null;
32    }
33
34    public function setId(int $new_id): void {
35        $this->id = $new_id;
36    }
37
38    public function getIpAddress(): string {
39        return $this->ip_address;
40    }
41
42    public function setIpAddress(string $new_ip_address): void {
43        $this->ip_address = $new_ip_address;
44    }
45
46    public function getTimestamp(): ?\DateTime {
47        return $this->timestamp;
48    }
49
50    public function setTimestamp(?\DateTime $new_timestamp): void {
51        $this->timestamp = $new_timestamp;
52    }
53
54    public function getAction(): string {
55        return $this->action;
56    }
57
58    public function setAction(string $new_action): void {
59        $this->action = $new_action;
60    }
61
62    public function getUsername(): string {
63        return $this->username;
64    }
65
66    public function setUsername(string $new_username): void {
67        $this->username = $new_username;
68    }
69
70    // ---
71
72    public function testOnlyGetField(string $field_name): mixed {
73        return $this->{$field_name};
74    }
75}