Passed
Push — master ( 03e013...bd5966 )
by Anatoly
01:18 queued 14s
created

Entry   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 76
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 76
c 1
b 0
f 0
ccs 6
cts 6
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A setName() 0 3 1
A getName() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace App\Entity;
4
5
/**
6
 * Entry
7
 *
8
 * @Table(
9
 *   name="entry",
10
 * )
11
 *
12
 * @Entity(
13
 *   repositoryClass="App\Repository\EntryRepository"
14
 * )
15
 *
16
 * @OpenApi\Schema(
17
 *   refName="Entry",
18
 *   type="object",
19
 *   required={"id", "name"},
20
 *   properties={
21
 *     "id": @OpenApi\SchemaReference(
22
 *       class="App\Entity\Entry",
23
 *       property="id",
24
 *     ),
25
 *     "name": @OpenApi\SchemaReference(
26
 *       class="App\Entity\Entry",
27
 *       property="name",
28
 *     ),
29
 *   },
30
 * )
31
 */
32
final class Entry
33
{
34
35
    /**
36
     * The entry ID
37
     *
38
     * @Id()
39
     *
40
     * @Column(
41
     *   type="integer",
42
     *   options={
43
     *     "unsigned": true,
44
     *   },
45
     * )
46
     *
47
     * @GeneratedValue(
48
     *   strategy="AUTO",
49
     * )
50
     *
51
     * @OpenApi\Schema(
52
     *   refName="EntryId",
53
     *   type="integer",
54
     *   format="int32",
55
     *   minimum=1,
56
     *   maximum=PHP_INT_MAX,
57
     *   nullable=false,
58
     *   readOnly=true,
59
     * )
60
     *
61
     * @var null|int
62
     */
63
    private $id;
64
65
    /**
66
     * The entry name
67
     *
68
     * @Column(
69
     *   type="string",
70
     *   length=255,
71
     *   nullable=false,
72
     * )
73
     *
74
     * @OpenApi\Schema(
75
     *   refName="EntryName",
76
     *   type="string",
77
     *   minLength=1,
78
     *   maxLength=255,
79
     *   nullable=false,
80
     * )
81
     *
82
     * @var null|string
83
     */
84
    private $name;
85
86
    /**
87
     * {@inheritDoc}
88
     */
89 2
    public function getId() : ?int
90
    {
91 2
        return $this->id;
92
    }
93
94
    /**
95
     * {@inheritDoc}
96
     */
97 2
    public function getName() : ?string
98
    {
99 2
        return $this->name;
100
    }
101
102
    /**
103
     * {@inheritDoc}
104
     */
105 10
    public function setName(string $name) : void
106
    {
107 10
        $this->name = $name;
108 10
    }
109
}
110