Completed
Push — master ( d19d30...257f70 )
by Joachim
13:38
created

State::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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
Bug introduced by
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
Bug introduced by
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
    /**
64
     * @return int
65
     */
66
    public function getId(): int
67
    {
68
        return (int)$this->id;
69
    }
70
71
    /**
72
     * @param int $id
73
     * @return StateInterface
74
     */
75
    public function setId($id)
76
    {
77
        $this->id = $id;
78
        return $this;
79
    }
80
81
    /**
82
     * @return int
83
     */
84
    public function getExternalId(): int
85
    {
86
        return (int)$this->externalId;
87
    }
88
89
    /**
90
     * @param int $externalId
91
     * @return StateInterface
92
     */
93
    public function setExternalId($externalId)
94
    {
95
        $this->externalId = $externalId;
96
        return $this;
97
    }
98
99
    /**
100
     * @return bool|null
101
     */
102
    public function getExclStatistics()
103
    {
104
        return $this->exclStatistics;
105
    }
106
107
    /**
108
     * @param bool|null $exclStatistics
109
     * @return StateInterface
110
     */
111
    public function setExclStatistics($exclStatistics)
112
    {
113
        $this->exclStatistics = $exclStatistics;
114
        return $this;
115
    }
116
117
    /**
118
     * @return bool|null
119
     */
120
    public function getIsDefault()
121
    {
122
        return $this->isDefault;
123
    }
124
125
    /**
126
     * @param bool|null $isDefault
127
     * @return StateInterface
128
     */
129
    public function setIsDefault($isDefault)
130
    {
131
        $this->isDefault = $isDefault;
132
        return $this;
133
    }
134
135
    /**
136
     * @return null|string
137
     */
138
    public function getName()
139
    {
140
        return $this->name;
141
    }
142
143
    /**
144
     * @param null|string $name
145
     * @return StateInterface
146
     */
147
    public function setName($name)
148
    {
149
        $this->name = $name;
150
        return $this;
151
    }
152
}
153