Passed
Push — master ( 87feaa...36ddae )
by Luiz Kim
29:25 queued 27:55
created

InvoiceTax::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
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 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace ControleOnline\Entity;
4
5
use ApiPlatform\Metadata\Post;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Metadata\Post 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
use ApiPlatform\Metadata\Get;
0 ignored issues
show
Bug introduced by
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...
7
use ApiPlatform\Metadata\ApiResource;
0 ignored issues
show
Bug introduced by
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...
8
use ApiPlatform\Metadata\ApiProperty;
0 ignored issues
show
Bug introduced by
The type ApiPlatform\Metadata\ApiProperty 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\ApiFilter;
0 ignored issues
show
Bug introduced by
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...
10
use ControleOnline\Controller\DownloadOrderNFAction;
11
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...
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
/**
14
 * InvoiceTax
15
 *
16
 * @ORM\EntityListeners ({ControleOnline\Listener\LogListener::class})
17
 * @ORM\Table (name="invoice_tax")
18
 * @ORM\Entity
19
 */
20
#[ApiResource(operations: [new Get(security: 'is_granted(\'ROLE_CLIENT\')'), new Get(security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')', uriTemplate: '/invoice_taxes/{id}/download-nf', requirements: ['id' => '[\\w-]+'], controller: DownloadOrderNFAction::class), new Post(uriTemplate: '/invoice_taxes/upload-nf', controller: \App\Controller\UploadOrderNFAction::class, deserialize: false, security: 'is_granted(\'ROLE_CLIENT\')', validationContext: ['groups' => ['Default', 'order_upload_nf']], openapiContext: ['consumes' => ['multipart/form-data']])], formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], normalizationContext: ['groups' => ['invoice_tax_read']], denormalizationContext: ['groups' => ['invoice_tax_write']])]
21
class InvoiceTax
22
{
23
    /**
24
     * @var integer
25
     *
26
     * @ORM\Column(name="id", type="integer", nullable=false)
27
     * @ORM\Id
28
     * @ORM\GeneratedValue(strategy="IDENTITY")
29
     */
30
    private $id;
31
    /**
32
     * @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...
33
     *
34
     * @ORM\OneToMany(targetEntity="ControleOnline\Entity\OrderInvoiceTax", mappedBy="invoiceTax")
35
     */
36
    private $order;
37
    /**
38
     * @var string
39
     *
40
     * @ORM\Column(name="invoice", type="string",  nullable=false)
41
     */
42
    private $invoice;
43
    /**
44
     * @var \Doctrine\Common\Collections\Collection
45
     *
46
     * @ORM\OneToMany(targetEntity="ControleOnline\Entity\ServiceInvoiceTax", mappedBy="service_invoice_tax")
47
     */
48
    private $service_invoice_tax;
49
    /**
50
     * @var string
51
     *
52
     * @ORM\Column(name="invoice_key", type="string",  nullable=true)
53
     * @Groups({"order_read"})
54
     */
55
    private $invoiceKey;
56
    /**
57
     * @var string
58
     *
59
     * @ORM\Column(name="invoice_number", type="integer",  nullable=false)
60
     * @Groups({"order_read"})
61
     */
62
    private $invoiceNumber;
63
    public function __construct()
64
    {
65
        $this->order = new \Doctrine\Common\Collections\ArrayCollection();
0 ignored issues
show
Bug introduced by
The type Doctrine\Common\Collections\ArrayCollection 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...
66
        $this->service_invoice_tax = new \Doctrine\Common\Collections\ArrayCollection();
67
    }
68
    /**
69
     * Get id
70
     *
71
     * @return integer
72
     */
73
    public function getId()
74
    {
75
        return $this->id;
76
    }
77
    /**
78
     * Add OrderInvoice
79
     *
80
     * @param \ControleOnline\Entity\OrderInvoice $order
81
     * @return People
0 ignored issues
show
Bug introduced by
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...
82
     */
83
    public function addOrder(\ControleOnline\Entity\OrderInvoice $order)
84
    {
85
        $this->order[] = $order;
86
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type ControleOnline\Entity\InvoiceTax which is incompatible with the documented return type ControleOnline\Entity\People.
Loading history...
87
    }
88
    /**
89
     * Remove OrderInvoice
90
     *
91
     * @param \ControleOnline\Entity\OrderInvoice $order
92
     */
93
    public function removeOrder(\ControleOnline\Entity\OrderInvoice $order)
94
    {
95
        $this->order->removeElement($order);
96
    }
97
    /**
98
     * Get OrderInvoice
99
     *
100
     * @return \Doctrine\Common\Collections\Collection
101
     */
102
    public function getOrder()
103
    {
104
        return $this->order;
105
    }
106
    /**
107
     * Set invoice
108
     *
109
     * @param string $invoice
110
     * @return Order
111
     */
112
    public function setInvoice($invoice)
113
    {
114
        $this->invoice = $invoice;
115
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type ControleOnline\Entity\InvoiceTax which is incompatible with the documented return type ControleOnline\Entity\Order.
Loading history...
116
    }
117
    /**
118
     * Get invoice
119
     *
120
     * @return string
121
     */
122
    public function getInvoice()
123
    {
124
        return $this->invoice;
125
    }
126
    /**
127
     * Set invoiceKey
128
     *
129
     * @param string $invoice_number
130
     * @return InvoiceTax
131
     */
132
    public function setInvoiceKey($invoice_key)
133
    {
134
        $this->invoiceKey = $invoice_key;
135
        return $this;
136
    }
137
    /**
138
     * Get invoiceNumber
139
     *
140
     * @return string
141
     */
142
    public function getInvoiceKey()
143
    {
144
        return $this->invoiceKey;
145
    }
146
    /**
147
     * Set invoiceNumber
148
     *
149
     * @param integer $invoice_number
150
     * @return InvoiceTax
151
     */
152
    public function setInvoiceNumber($invoice_number)
153
    {
154
        $this->invoiceNumber = $invoice_number;
155
        return $this;
156
    }
157
    /**
158
     * Get invoiceNumber
159
     *
160
     * @return integer
161
     */
162
    public function getInvoiceNumber()
163
    {
164
        return $this->invoiceNumber;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->invoiceNumber returns the type string which is incompatible with the documented return type integer.
Loading history...
165
    }
166
    /**
167
     * Add ServiceInvoiceTax
168
     *
169
     * @param \ControleOnline\Entity\ServiceInvoiceTax $service_invoice_tax
170
     * @return InvoiceTax
171
     */
172
    public function addServiceInvoiceTax(\ControleOnline\Entity\ServiceInvoiceTax $service_invoice_tax)
173
    {
174
        $this->service_invoice_tax[] = $service_invoice_tax;
175
        return $this;
176
    }
177
    /**
178
     * Remove ServiceInvoiceTax
179
     *
180
     * @param \ControleOnline\Entity\ServiceInvoiceTax $service_invoice_tax
181
     */
182
    public function removeServiceInvoiceTax(\ControleOnline\Entity\ServiceInvoiceTax $service_invoice_tax)
183
    {
184
        $this->service_invoice_tax->removeElement($service_invoice_tax);
185
    }
186
    /**
187
     * Get ServiceInvoiceTax
188
     *
189
     * @return \Doctrine\Common\Collections\Collection
190
     */
191
    public function getServiceInvoiceTax()
192
    {
193
        return $this->service_invoice_tax;
194
    }
195
}
196