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

Display::getId()   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 0
dl 0
loc 3
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
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({App\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.orderQueue.status.realStatus": "exact",
48
 *     "displayQueue.queue.orderQueue.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({"order_read","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({"order_read","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({"order_read","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({"order_read","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
     * Get the value of id
105
     */
106
    public function getId()
107
    {
108
        return $this->id;
109
    }
110
111
    /**
112
     * Set the value of id
113
     */
114
    public function setId($id): self
115
    {
116
        $this->id = $id;
117
118
        return $this;
119
    }
120
121
    /**
122
     * Get the value of display
123
     */
124
    public function getDisplay()
125
    {
126
        return $this->display;
127
    }
128
129
    /**
130
     * Set the value of display
131
     */
132
    public function setDisplay($display): self
133
    {
134
        $this->display = $display;
135
136
        return $this;
137
    }
138
139
    /**
140
     * Get the value of displayType
141
     */
142
    public function getDisplayType()
143
    {
144
        return $this->displayType;
145
    }
146
147
    /**
148
     * Set the value of displayType
149
     */
150
    public function setDisplayType($displayType): self
151
    {
152
        $this->displayType = $displayType;
153
154
        return $this;
155
    }
156
157
    /**
158
     * Get the value of company
159
     */
160
    public function getCompany()
161
    {
162
        return $this->company;
163
    }
164
165
    /**
166
     * Set the value of company
167
     */
168
    public function setCompany($company): self
169
    {
170
        $this->company = $company;
171
172
        return $this;
173
    }
174
175
176
177
    /**
178
     * Add DisplayQueue
179
     *
180
     * @param \ControleOnline\Entity\DisplayQueue $invoice_tax
181
     * @return Order
182
     */
183
    public function addADisplayQueue(\ControleOnline\Entity\DisplayQueue $displayQueue)
184
    {
185
        $this->displayQueue[] = $displayQueue;
186
187
        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...
188
    }
189
190
    /**
191
     * Remove DisplayQueue
192
     *
193
     * @param \ControleOnline\Entity\DisplayQueue $invoice_tax
194
     */
195
    public function removeDisplayQueue(\ControleOnline\Entity\DisplayQueue $displayQueue)
196
    {
197
        $this->displayQueue->removeElement($displayQueue);
198
    }
199
200
    /**
201
     * Get DisplayQueue
202
     *
203
     * @return \Doctrine\Common\Collections\Collection
204
     */
205
    public function getDisplayQueue()
206
    {
207
        return $this->displayQueue;
208
    }
209
}
210