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