Issues (79)

src/Entity/Queue.php (13 issues)

Labels
Severity
1
<?php
2
namespace ControleOnline\Entity;
3
4
use Symfony\Component\Serializer\Attribute\Groups;
0 ignored issues
show
The type Symfony\Component\Serializer\Attribute\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...
5
6
use ApiPlatform\Metadata\ApiResource;
0 ignored issues
show
The type ApiPlatform\Metadata\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...
7
use ApiPlatform\Metadata\ApiFilter;
0 ignored issues
show
The type ApiPlatform\Metadata\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...
8
use ApiPlatform\Metadata\Get;
0 ignored issues
show
The type ApiPlatform\Metadata\Get 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\Metadata\GetCollection;
0 ignored issues
show
The type ApiPlatform\Metadata\GetCollection 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\Metadata\Put;
0 ignored issues
show
The type ApiPlatform\Metadata\Put 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\Metadata\Delete;
0 ignored issues
show
The type ApiPlatform\Metadata\Delete 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\Doctrine\Orm\Filter\SearchFilter;
0 ignored issues
show
The type ApiPlatform\Doctrine\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
use Doctrine\Common\Collections\Collection;
0 ignored issues
show
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...
14
use Doctrine\ORM\Mapping as ORM;
0 ignored issues
show
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...
15
use ControleOnline\Entity\People;
0 ignored issues
show
The type ControleOnline\Entity\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...
16
use ControleOnline\Entity\Status;
0 ignored issues
show
The type 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...
17
use ControleOnline\Entity\OrderProductQueue;
18
use ControleOnline\Entity\DisplayQueue;
19
use ControleOnline\Listener\LogListener;
0 ignored issues
show
The type ControleOnline\Listener\LogListener 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...
20
21
#[ORM\Table(name: 'queue')]
22
#[ORM\Index(name: 'company_id', columns: ['company_id'])]
23
#[ORM\UniqueConstraint(name: 'queue', columns: ['queue', 'company_id'])]
24
#[ORM\EntityListeners([LogListener::class])]
25
#[ORM\Entity]
26
#[ApiResource(
27
    formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => 'text/csv'],
28
    normalizationContext: ['groups' => ['queue:read']],
29
    denormalizationContext: ['groups' => ['queue:write']],
30
    security: "is_granted('ROLE_CLIENT')",
31
    operations: [
32
        new GetCollection(security: "is_granted('ROLE_CLIENT')"),
33
        new Get(security: "is_granted('ROLE_CLIENT')"),
34
        new Put(security: "is_granted('ROLE_CLIENT')"),
35
        new Delete(security: "is_granted('ROLE_CLIENT')")
36
    ]
37
)]
38
class Queue
39
{
40
    #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
41
    #[ORM\Id]
42
    #[ORM\GeneratedValue(strategy: 'IDENTITY')]
43
    #[Groups(['display_queue:read', 'product_category:read', 'order_product_queue:read', 'product:read', 'product_group_product:read', 'order_product:read', 'order:read', 'order_details:read', 'order:write',  'queue:read', 'queue:write'])]
44
    private $id;
45
46
    #[ORM\Column(name: 'queue', type: 'string', length: 50, nullable: false)]
47
    #[Groups(['display_queue:read', 'product_category:read', 'order_product_queue:read', 'product:read', 'product_group_product:read', 'order_product:read', 'order:read', 'order_details:read', 'order:write',  'queue:read', 'queue:write'])]
48
    private $queue;
49
50
    #[ORM\ManyToOne(targetEntity: Status::class)]
51
    #[ORM\JoinColumn(name: 'status_in_id', referencedColumnName: 'id')]
52
    #[ApiFilter(SearchFilter::class, properties: ['status_in' => 'exact'])]
53
    #[Groups(['display_queue:read', 'order:read', 'order_details:read', 'order:write',  'display:read', 'display:write'])]
54
    private $status_in;
55
56
    #[ORM\ManyToOne(targetEntity: Status::class)]
57
    #[ORM\JoinColumn(name: 'status_working_id', referencedColumnName: 'id')]
58
    #[ApiFilter(SearchFilter::class, properties: ['status_working' => 'exact'])]
59
    #[Groups(['display_queue:read', 'order:read', 'order_details:read', 'order:write',  'display:read', 'display:write'])]
60
    private $status_working;
61
62
    #[ORM\ManyToOne(targetEntity: Status::class)]
63
    #[ORM\JoinColumn(name: 'status_out_id', referencedColumnName: 'id')]
64
    #[ApiFilter(SearchFilter::class, properties: ['status_out' => 'exact'])]
65
    #[Groups(['display_queue:read', 'order:read', 'order_details:read', 'order:write',  'display:read', 'display:write'])]
66
    private $status_out;
67
68
    #[ORM\ManyToOne(targetEntity: People::class)]
69
    #[ORM\JoinColumn(name: 'company_id', referencedColumnName: 'id')]
70
    #[ApiFilter(SearchFilter::class, properties: ['company' => 'exact'])]
71
    #[Groups(['display_queue:read', 'product_category:read', 'order_product_queue:read', 'product:read', 'product_group_product:read', 'order_product:read', 'order:read', 'order_details:read', 'order:write',  'queue:read', 'queue:write'])]
72
    private $company;
73
74
    #[ORM\OneToMany(targetEntity: OrderProductQueue::class, mappedBy: 'queue')]
75
    private $orderProductQueue;
76
77
    #[ORM\OneToMany(targetEntity: DisplayQueue::class, mappedBy: 'queue')]
78
    private $displayQueue;
79
80
    public function getId()
81
    {
82
        return $this->id;
83
    }
84
85
    public function setId($id): self
86
    {
87
        $this->id = $id;
88
        return $this;
89
    }
90
91
    public function getQueue()
92
    {
93
        return $this->queue;
94
    }
95
96
    public function setQueue($queue): self
97
    {
98
        $this->queue = $queue;
99
        return $this;
100
    }
101
102
    public function getCompany()
103
    {
104
        return $this->company;
105
    }
106
107
    public function setCompany($company): self
108
    {
109
        $this->company = $company;
110
        return $this;
111
    }
112
113
    public function addAOrderProductQueue(OrderProductQueue $orderProductQueue)
114
    {
115
        $this->orderProductQueue[] = $orderProductQueue;
116
        return $this;
117
    }
118
119
    public function removeOrderProductQueue(OrderProductQueue $orderProductQueue)
120
    {
121
        $this->orderProductQueue->removeElement($orderProductQueue);
122
    }
123
124
    public function getOrderProductQueue()
125
    {
126
        return $this->orderProductQueue;
127
    }
128
129
    public function addADisplayQueue(DisplayQueue $displayQueue)
130
    {
131
        $this->displayQueue[] = $displayQueue;
132
        return $this;
133
    }
134
135
    public function removeDisplayQueue(DisplayQueue $displayQueue)
136
    {
137
        $this->displayQueue->removeElement($displayQueue);
138
    }
139
140
    public function getDisplayQueue()
141
    {
142
        return $this->displayQueue;
143
    }
144
145
    public function getStatusIn()
146
    {
147
        return $this->status_in;
148
    }
149
150
    public function setStatusIn($status_in): self
151
    {
152
        $this->status_in = $status_in;
153
        return $this;
154
    }
155
156
    public function getStatusWorking()
157
    {
158
        return $this->status_working;
159
    }
160
161
    public function setStatusWorking($status_working): self
162
    {
163
        $this->status_working = $status_working;
164
        return $this;
165
    }
166
167
    public function getStatusOut()
168
    {
169
        return $this->status_out;
170
    }
171
172
    public function setStatusOut($status_out): self
173
    {
174
        $this->status_out = $status_out;
175
        return $this;
176
    }
177
}