Issues (174)

src/Entity/State.php (2 issues)

Labels
Severity
1
<?php
2
3
namespace Loevgaard\DandomainFoundation\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Loevgaard\DandomainFoundation\Entity\Generated\StateInterface;
0 ignored issues
show
The type Loevgaard\DandomainFound...enerated\StateInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Loevgaard\DandomainFoundation\Entity\Generated\StateTrait;
0 ignored issues
show
The type Loevgaard\DandomainFound...ty\Generated\StateTrait was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
9
/**
10
 * @ORM\Entity()
11
 * @ORM\Table(name="ldf_states")
12
 */
13
class State extends AbstractEntity implements StateInterface
14
{
15
    use StateTrait;
16
17
    protected $hydrateConversions = [
18
        'id' => 'externalId',
19
    ];
20
21
    /**
22
     * @var int
23
     *
24
     * @ORM\Id
25
     * @ORM\GeneratedValue
26
     * @ORM\Column(type="integer")
27
     **/
28
    protected $id;
29
30
    /**
31
     * @var int
32
     *
33
     * @ORM\Column(type="integer", unique=true)
34
     */
35
    protected $externalId;
36
37
    /**
38
     * @var bool|null
39
     *
40
     * @ORM\Column(nullable=true, type="boolean")
41
     */
42
    protected $exclStatistics;
43
44
    /**
45
     * @var bool|null
46
     *
47
     * @ORM\Column(nullable=true, type="boolean")
48
     */
49
    protected $isDefault;
50
51
    /**
52
     * @var string|null
53
     *
54
     * @ORM\Column(nullable=true, type="string", length=191)
55
     */
56
    protected $name;
57
58
    public function __toString()
59
    {
60
        return (string) $this->name;
61
    }
62
63 4
    /**
64
     * @return int
65 4
     */
66 2
    public function getId(): int
67
    {
68 2
        return (int) $this->id;
69
    }
70
71
    /**
72
     * @param int $id
73 2
     *
74
     * @return StateInterface
75 2
     */
76 1
    public function setId($id)
77 2
    {
78 1
        $this->id = $id;
79
80 5
        return $this;
81
    }
82 4
83
    /**
84
     * @return int
85
     */
86 2
    public function getExternalId(): int
87
    {
88 2
        return (int) $this->externalId;
89
    }
90 2
91
    /**
92 2
     * @param int $externalId
93
     *
94 2
     * @return StateInterface
95
     */
96 1
    public function setExternalId($externalId)
97
    {
98 1
        $this->externalId = $externalId;
99
100 3
        return $this;
101
    }
102 2
103
    /**
104
     * @return bool|null
105
     */
106 1
    public function getExclStatistics()
107
    {
108 1
        return $this->exclStatistics;
109
    }
110 2
111
    /**
112 2
     * @param bool|null $exclStatistics
113
     *
114 2
     * @return StateInterface
115
     */
116 1
    public function setExclStatistics($exclStatistics)
117
    {
118 1
        $this->exclStatistics = $exclStatistics;
119
120 3
        return $this;
121
    }
122 2
123
    /**
124
     * @return bool|null
125
     */
126 1
    public function getIsDefault()
127
    {
128 1
        return $this->isDefault;
129
    }
130 2
131
    /**
132 2
     * @param bool|null $isDefault
133
     *
134 2
     * @return StateInterface
135
     */
136 1
    public function setIsDefault($isDefault)
137
    {
138 1
        $this->isDefault = $isDefault;
139
140 3
        return $this;
141
    }
142 2
143
    /**
144
     * @return null|string
145
     */
146 1
    public function getName()
147
    {
148 1
        return $this->name;
149
    }
150 2
151
    /**
152 2
     * @param null|string $name
153
     *
154 2
     * @return StateInterface
155
     */
156 1
    public function setName($name)
157
    {
158 1
        $this->name = $name;
159
160 1
        return $this;
161
    }
162
}
163