Passed
Push — master ( cfba1e...2c6822 )
by Luiz Kim
02:12
created

OrderInvoiceTax   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 139
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 22
c 1
b 0
f 0
dl 0
loc 139
rs 10
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getOrder() 0 3 1
A setIssuer() 0 4 1
A setInvoiceType() 0 4 1
A setOrder() 0 4 1
A setInvoiceTax() 0 4 1
A getIssuer() 0 3 1
A getInvoiceTax() 0 3 1
A getId() 0 3 1
A __construct() 0 4 1
A getInvoiceType() 0 3 1
1
<?php
2
3
namespace ControleOnline\Entity;
4
5
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...
6
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...
7
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...
8
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...
9
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...
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
/**
12
 * OrderInvoiceTax
13
 *
14
 * @ORM\EntityListeners ({ControleOnline\Listener\LogListener::class})
15
 * @ORM\Table (name="order_invoice_tax", uniqueConstraints={@ORM\UniqueConstraint (name="order_id", columns={"order_id", "invoice_tax_id"}),@ORM\UniqueConstraint(name="invoice_type", columns={"issuer_id", "invoice_type", "order_id"})}, indexes={@ORM\Index (name="invoice_tax_id", columns={"invoice_tax_id"})})
16
 * @ORM\Entity
17
 */
18
#[ApiResource(operations: [new Get(security: 'is_granted(\'ROLE_CLIENT\')')], formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], normalizationContext: ['groups' => ['order_invoice_tax_read']], denormalizationContext: ['groups' => ['order_invoice_tax_write']])]
19
class OrderInvoiceTax
20
{
21
    /**
22
     * @var integer
23
     *
24
     * @ORM\Column(name="id", type="integer", nullable=false)
25
     * @ORM\Id
26
     * @ORM\GeneratedValue(strategy="IDENTITY")
27
     */
28
    private $id;
29
    /**
30
     * @var \ControleOnline\Entity\InvoiceTax
31
     *
32
     * @ORM\ManyToOne(targetEntity="ControleOnline\Entity\InvoiceTax", inversedBy="order")
33
     * @ORM\JoinColumns({
34
     *   @ORM\JoinColumn(name="invoice_tax_id", referencedColumnName="id")
35
     * })
36
     * @Groups({"order_read"})
37
     */
38
    private $invoiceTax;
39
    /**
40
     * @var \ControleOnline\Entity\Order
41
     *
42
     * @ORM\ManyToOne(targetEntity="ControleOnline\Entity\Order", inversedBy="invoiceTax")
43
     * @ORM\JoinColumns({
44
     *   @ORM\JoinColumn(name="order_id", referencedColumnName="id")
45
     * })
46
     */
47
    private $order;
48
    /**
49
     * @var \ControleOnline\Entity\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...
50
     *
51
     * @ORM\ManyToOne(targetEntity="ControleOnline\Entity\People")
52
     * @ORM\JoinColumns({
53
     *   @ORM\JoinColumn(name="issuer_id", referencedColumnName="id")
54
     * })
55
     */
56
    private $issuer;
57
    /**
58
     * @var string
59
     *
60
     * @ORM\Column(name="invoice_type", type="integer",  nullable=false)
61
     * @Groups({"order_detail_status_read"})
62
     */
63
    private $invoiceType;
64
    public function __construct()
65
    {
66
        $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...
67
        $this->invoiceTax = new \Doctrine\Common\Collections\ArrayCollection();
68
    }
69
    /**
70
     * Get id
71
     *
72
     * @return integer
73
     */
74
    public function getId()
75
    {
76
        return $this->id;
77
    }
78
    /**
79
     * Set invoiceTax
80
     *
81
     * @param \ControleOnline\Entity\InvoiceTax $invoice_tax
82
     * @return OrderInvoiceTax
83
     */
84
    public function setInvoiceTax(\ControleOnline\Entity\InvoiceTax $invoice_tax = null)
85
    {
86
        $this->invoiceTax = $invoice_tax;
87
        return $this;
88
    }
89
    /**
90
     * Get invoiceTax
91
     *
92
     * @return \ControleOnline\Entity\InvoiceTax
93
     */
94
    public function getInvoiceTax()
95
    {
96
        return $this->invoiceTax;
97
    }
98
    /**
99
     * Set order
100
     *
101
     * @param \ControleOnline\Entity\Order $order
102
     * @return OrderInvoiceTax
103
     */
104
    public function setOrder(\ControleOnline\Entity\Order $order = null)
105
    {
106
        $this->order = $order;
107
        return $this;
108
    }
109
    /**
110
     * Get order
111
     *
112
     * @return \ControleOnline\Entity\Order
113
     */
114
    public function getOrder()
115
    {
116
        return $this->order;
117
    }
118
    /**
119
     * Set invoice_type
120
     *
121
     * @param integer $invoice_type
122
     * @return Order
123
     */
124
    public function setInvoiceType($invoice_type)
125
    {
126
        $this->invoiceType = $invoice_type;
127
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type ControleOnline\Entity\OrderInvoiceTax which is incompatible with the documented return type ControleOnline\Entity\Order.
Loading history...
128
    }
129
    /**
130
     * Get invoice_type
131
     *
132
     * @return integer
133
     */
134
    public function getInvoiceType()
135
    {
136
        return $this->invoiceType;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->invoiceType returns the type string which is incompatible with the documented return type integer.
Loading history...
137
    }
138
    /**
139
     * Set issuer
140
     *
141
     * @param \ControleOnline\Entity\People $issuer
142
     * @return People
143
     */
144
    public function setIssuer(\ControleOnline\Entity\People $issuer = null)
145
    {
146
        $this->issuer = $issuer;
147
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type ControleOnline\Entity\OrderInvoiceTax which is incompatible with the documented return type ControleOnline\Entity\People.
Loading history...
148
    }
149
    /**
150
     * Get issuer
151
     *
152
     * @return \ControleOnline\Entity\People
153
     */
154
    public function getIssuer()
155
    {
156
        return $this->issuer;
157
    }
158
}
159