Passed
Push — master ( 80339c...7b002e )
by Luiz Kim
09:49 queued 02:01
created

Display::getStatusWorking()   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 ControleOnline\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
0 ignored issues
show
Bug introduced by
The type Doctrine\ORM\Mapping 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...
6
7
8
9
use ApiPlatform\Core\Annotation\ApiResource;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Core\Annotation\ApiResource 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...
10
use Symfony\Component\Serializer\Annotation\Groups;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Serializer\Annotation\Groups 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...
11
use ApiPlatform\Core\Annotation\ApiFilter;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Core\Annotation\ApiFilter 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...
12
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Core\Bridge\...Orm\Filter\SearchFilter 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...
13
14
15
/**
16
 * @ORM\EntityListeners({ControleOnline\Listener\LogListener::class})
17
 * @ApiResource(
18
 *     attributes={
19
 *          "formats"={"jsonld", "json", "html", "jsonhal", "csv"={"text/csv"}},
20
 *          "access_control"="is_granted('ROLE_CLIENT')"
21
 *     }, 
22
 *     normalizationContext  ={"groups"={"display:read"}},
23
 *     denormalizationContext={"groups"={"display:write"}},
24
 *     attributes            ={"access_control"="is_granted('ROLE_CLIENT')"},
25
 *     collectionOperations  ={
26
 *          "get"              ={
27
 *            "access_control"="is_granted('ROLE_CLIENT')", 
28
 *          },
29
 *         "post"           ={
30
 *           "access_control"="is_granted('ROLE_CLIENT')",  
31
 *         },
32
 *     },
33
 *     itemOperations        ={
34
 *         "get"           ={
35
 *           "access_control"="is_granted('ROLE_CLIENT')", 
36
 *         },
37
 *         "put"           ={
38
 *           "access_control"="is_granted('ROLE_CLIENT')",  
39
 *         },
40
 *         "delete"           ={
41
 *           "access_control"="is_granted('ROLE_CLIENT')",  
42
 *         }, 
43
 *     }
44
 * )
45
 * @ApiFilter(
46
 *   SearchFilter::class, properties={ 
47
 *     "displayQueue.queue.orderProductQueue.status.realStatus": "exact",
48
 *     "displayQueue.queue.orderProductQueue.status.status": "exact",
49
 *   }
50
 * ) 
51
 * @ORM\Table(name="display", indexes={@ORM\Index(name="company_id", columns={"company_id"})})
52
 * @ORM\Entity
53
 */
54
55
class Display
56
{
57
    /**
58
     * @var int
59
     *
60
     * @ORM\Column(name="id", type="integer", nullable=false)
61
     * @ORM\Id
62
     * @ORM\GeneratedValue(strategy="IDENTITY")
63
     * @Groups({"display_queue:read","order:read","order_details:read","order:write","display:read", "display:write"})   
64
     */
65
    private $id;
66
67
    /**
68
     * @var string
69
     *
70
     * @ORM\Column(name="display", type="string", length=50, nullable=false)
71
     * @Groups({"display_queue:read","order:read","order_details:read","order:write","display:read", "display:write"})   
72
     */
73
    private $display;
74
75
    /**
76
     * @var string
77
     *
78
     * @ORM\Column(name="display_type", type="string", length=0, nullable=false, options={"default"="'display'"})
79
     * @Groups({"display_queue:read","order:read","order_details:read","order:write","display:read", "display:write"})   
80
     */
81
    private $displayType = '\'display\'';
82
83
    /**
84
     * @var \People
0 ignored issues
show
Bug introduced by
The type People 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...
85
     *
86
     * @ORM\ManyToOne(targetEntity="People")
87
     * @ORM\JoinColumns({
88
     *   @ORM\JoinColumn(name="company_id", referencedColumnName="id")
89
     * })
90
     * @Groups({"display_queue:read","order:read","order_details:read","order:write","display:read", "display:write"})   
91
     */
92
    private $company;
93
94
95
    /**
96
     * @var \Doctrine\Common\Collections\Collection
0 ignored issues
show
Bug introduced by
The type Doctrine\Common\Collections\Collection 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...
97
     *
98
     * @ORM\OneToMany(targetEntity="ControleOnline\Entity\DisplayQueue", mappedBy="display")     
99
     */
100
    private $displayQueue;
101
102
103
104
    /**
105
     * Get the value of id
106
     */
107
    public function getId()
108
    {
109
        return $this->id;
110
    }
111
112
    /**
113
     * Set the value of id
114
     */
115
    public function setId($id): self
116
    {
117
        $this->id = $id;
118
119
        return $this;
120
    }
121
122
    /**
123
     * Get the value of display
124
     */
125
    public function getDisplay()
126
    {
127
        return $this->display;
128
    }
129
130
    /**
131
     * Set the value of display
132
     */
133
    public function setDisplay($display): self
134
    {
135
        $this->display = $display;
136
137
        return $this;
138
    }
139
140
    /**
141
     * Get the value of displayType
142
     */
143
    public function getDisplayType()
144
    {
145
        return $this->displayType;
146
    }
147
148
    /**
149
     * Set the value of displayType
150
     */
151
    public function setDisplayType($displayType): self
152
    {
153
        $this->displayType = $displayType;
154
155
        return $this;
156
    }
157
158
    /**
159
     * Get the value of company
160
     */
161
    public function getCompany()
162
    {
163
        return $this->company;
164
    }
165
166
    /**
167
     * Set the value of company
168
     */
169
    public function setCompany($company): self
170
    {
171
        $this->company = $company;
172
173
        return $this;
174
    }
175
176
177
178
    /**
179
     * Add DisplayQueue
180
     *
181
     * @param \ControleOnline\Entity\DisplayQueue $invoice_tax
182
     * @return Order
183
     */
184
    public function addADisplayQueue(\ControleOnline\Entity\DisplayQueue $displayQueue)
185
    {
186
        $this->displayQueue[] = $displayQueue;
187
188
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type ControleOnline\Entity\Display which is incompatible with the documented return type ControleOnline\Entity\Order.
Loading history...
189
    }
190
191
    /**
192
     * Remove DisplayQueue
193
     *
194
     * @param \ControleOnline\Entity\DisplayQueue $invoice_tax
195
     */
196
    public function removeDisplayQueue(\ControleOnline\Entity\DisplayQueue $displayQueue)
197
    {
198
        $this->displayQueue->removeElement($displayQueue);
199
    }
200
201
    /**
202
     * Get DisplayQueue
203
     *
204
     * @return \Doctrine\Common\Collections\Collection
205
     */
206
    public function getDisplayQueue()
207
    {
208
        return $this->displayQueue;
209
    }
210
211
}
212