Test Setup Failed
Push — master ( eaec61...fed08a )
by Ion
02:23
created

ObjectEntry::getCreatedAt()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Infrastructure\Persistence\Entity;
6
7
use DateTimeInterface;
8
use Doctrine\ORM\Mapping as ORM;
9
use Ramsey\Uuid\Doctrine\UuidGenerator;
10
use Ramsey\Uuid\UuidInterface;
11
12
/**
13
 * @ORM\Entity(repositoryClass="App\Infrastructure\Persistence\Repository\ObjectEntryRepository")
14
 * @ORM\Table(
15
 *     name="object_entry",
16
 *     uniqueConstraints={
17
 *         @ORM\UniqueConstraint(name="key_date_idx", columns={"key", "created_at"})
18
 *     }
19
 * )
20
 */
21
class ObjectEntry
22
{
23
    /**
24
     * @ORM\Id()
25
     * @ORM\Column(type="uuid")
26
     * @ORM\GeneratedValue(strategy="CUSTOM")
27
     * @ORM\CustomIdGenerator(class=UuidGenerator::class)
28
     */
29
    protected UuidInterface $id;
30
31
    /**
32
     * @ORM\Column(type="string", name="`key`", options={"collation": "utf8mb4_bin", "charset": "utf8mb4"})
33
     */
34
    protected string $key;
35
36
    /**
37
     * @ORM\Column(type="datetime", columnDefinition="timestamp not null")
38
     */
39
    protected DateTimeInterface $createdAt;
40
41
    /**
42
     * @ORM\Column(type="json", name="`value`", nullable=true)
43
     */
44
    protected $value;
45
46 1
    public function getId(): UuidInterface
47
    {
48 1
        return $this->id;
49
    }
50
51 1
    public function getKey(): string
52
    {
53 1
        return $this->key;
54
    }
55
56 11
    public function setKey(string $key): void
57
    {
58 11
        $this->key = $key;
59 11
    }
60
61 1
    public function getCreatedAt(): DateTimeInterface
62
    {
63 1
        return $this->createdAt;
64
    }
65
66 11
    public function setCreatedAt(DateTimeInterface $createdAt): void
67
    {
68 11
        $this->createdAt = $createdAt;
69 11
    }
70
71 8
    public function getValue()
72
    {
73 8
        return $this->value;
74
    }
75
76 11
    public function setValue($value): void
77
    {
78 11
        $this->value = $value;
79 11
    }
80
}
81