Passed
Push — master ( 5280b1...f24963 )
by Luiz Kim
05:34 queued 03:35
created

OrderProductQueue::setOrderProduct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
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
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...
8
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...
9
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...
10
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...
11
12
13
/**
14
 * @ORM\EntityListeners({ControleOnline\Listener\LogListener::class})
15
 * @ApiResource(
16
 *     attributes={
17
 *          "formats"={"jsonld", "json", "html", "jsonhal", "csv"={"text/csv"}},
18
 *          "access_control"="is_granted('ROLE_CLIENT')"
19
 *     }, 
20
 *     normalizationContext  ={"groups"={"order_product_queue:read"}},
21
 *     denormalizationContext={"groups"={"order_product_queue:write"}},
22
 *     attributes            ={"access_control"="is_granted('ROLE_CLIENT')"},
23
 *     collectionOperations  ={
24
 *          "get"              ={
25
 *            "access_control"="is_granted('ROLE_CLIENT')", 
26
 *          },
27
 *     },
28
 *     itemOperations        ={
29
 *         "get"           ={
30
 *           "access_control"="is_granted('ROLE_CLIENT')", 
31
 *         },
32
 *         "put"           ={
33
 *           "access_control"="is_granted('ROLE_CLIENT')",  
34
 *         },
35
 *         "delete"           ={
36
 *           "access_control"="is_granted('ROLE_CLIENT')",  
37
 *         }, 
38
 *     }
39
 * )
40
 * @ORM\Table(name="order_product_queue", indexes={@ORM\Index(name="status_id", columns={"status_id"}), @ORM\Index(name="queue_id", columns={"queue_id"}), @ORM\Index(name="people_id", columns={"order_id"})})
41
 * @ORM\Entity
42
 */
43
44
45
class OrderProductQueue
46
{
47
    /**
48
     * @var int
49
     *
50
     * @ORM\Column(name="id", type="integer", nullable=false)
51
     * @ORM\Id
52
     * @ORM\GeneratedValue(strategy="IDENTITY")
53
     * @Groups({"order:read","order_details:read","order:write","order_product_queue:read", "order_product_queue:write"}) 
54
     */
55
    private $id;
56
57
    /**
58
     * @var string
59
     *
60
     * @ORM\Column(name="priority", type="string", length=0, nullable=false)
61
     * @Groups({"order:read","order_details:read","order:write","order_product_queue:read", "order_product_queue:write"})  
62
     */
63
    private $priority;
64
65
    /**
66
     * @var \DateTime
67
     *
68
     * @ORM\Column(name="register_time", type="datetime", nullable=false, options={"default"="current_timestamp()"})
69
     * @Groups({"order:read","order_details:read","order:write","order_product_queue:read", "order_product_queue:write"})   
70
     */
71
    private $registerTime = 'current_timestamp()';
72
73
    /**
74
     * @var \DateTime
75
     *
76
     * @ORM\Column(name="update_time", type="datetime", nullable=false, options={"default"="current_timestamp()"})
77
     * @Groups({"order:read","order_details:read","order:write","order_product_queue:read", "order_product_queue:write"})  
78
     */
79
    private $updateTime = 'current_timestamp()';
80
81
    /**
82
     * @var OrderProduct
83
     *
84
     * @ORM\ManyToOne(targetEntity="OrderProduct")
85
     * @ORM\JoinColumns({
86
     *   @ORM\JoinColumn(name="order_product_id", referencedColumnName="id")
87
     * })
88
     * @Groups({"order_product_queue:read", "order_product_queue:write"})  
89
     */
90
    private $order_product;
91
92
    /**
93
     * @var ControleOnline\Entity\Status
0 ignored issues
show
Bug introduced by
The type ControleOnline\Entity\ControleOnline\Entity\Status 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...
94
     *
95
     * @ORM\ManyToOne(targetEntity="ControleOnline\Entity\Status")
96
     * @ORM\JoinColumns({
97
     *   @ORM\JoinColumn(name="status_id", referencedColumnName="id")
98
     * })
99
     * @Groups({"order:read","order_details:read","order:write","order_product_queue:read", "order_product_queue:write"})  
100
     */
101
    private $status;
102
103
    /**
104
     * @var \Queue
0 ignored issues
show
Bug introduced by
The type Queue 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...
105
     *
106
     * @ORM\ManyToOne(targetEntity="Queue")
107
     * @ORM\JoinColumns({
108
     *   @ORM\JoinColumn(name="queue_id", referencedColumnName="id")
109
     * })
110
     * @Groups({"order:read","order_details:read","order:write","order_product_queue:read", "order_product_queue:write"})  
111
     */
112
    private $queue;
113
114
    /**
115
     * Get the value of id
116
     */
117
    public function getId()
118
    {
119
        return $this->id;
120
    }
121
122
    /**
123
     * Set the value of id
124
     */
125
    public function setId($id): self
126
    {
127
        $this->id = $id;
128
129
        return $this;
130
    }
131
132
    /**
133
     * Get the value of priority
134
     */
135
    public function getPriority()
136
    {
137
        return $this->priority;
138
    }
139
140
    /**
141
     * Set the value of priority
142
     */
143
    public function setPriority($priority): self
144
    {
145
        $this->priority = $priority;
146
147
        return $this;
148
    }
149
150
    /**
151
     * Get the value of registerTime
152
     */
153
    public function getRegisterTime()
154
    {
155
        return $this->registerTime;
156
    }
157
158
    /**
159
     * Set the value of registerTime
160
     */
161
    public function setRegisterTime($registerTime): self
162
    {
163
        $this->registerTime = $registerTime;
164
165
        return $this;
166
    }
167
168
    /**
169
     * Get the value of updateTime
170
     */
171
    public function getUpdateTime()
172
    {
173
        return $this->updateTime;
174
    }
175
176
    /**
177
     * Set the value of updateTime
178
     */
179
    public function setUpdateTime($updateTime): self
180
    {
181
        $this->updateTime = $updateTime;
182
183
        return $this;
184
    }
185
186
    /**
187
     * Get the value of status
188
     */
189
    public function getStatus()
190
    {
191
        return $this->status;
192
    }
193
194
    /**
195
     * Set the value of status
196
     */
197
    public function setStatus($status): self
198
    {
199
        $this->status = $status;
200
201
        return $this;
202
    }
203
204
    /**
205
     * Get the value of queue
206
     */
207
    public function getQueue()
208
    {
209
        return $this->queue;
210
    }
211
212
    /**
213
     * Set the value of queue
214
     */
215
    public function setQueue($queue): self
216
    {
217
        $this->queue = $queue;
218
219
        return $this;
220
    }
221
222
    /**
223
     * Get the value of order_product
224
     */
225
    public function getOrderProduct()
226
    {
227
        return $this->order_product;
228
    }
229
230
    /**
231
     * Set the value of order_product
232
     */
233
    public function setOrderProduct($order_product): self
234
    {
235
        $this->order_product = $order_product;
236
237
        return $this;
238
    }
239
}
240