Passed
Push — master ( 41b396...8925e1 )
by Luiz Kim
15:46 queued 07:36
created

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