Completed
Push — master ( 31ac84...e79cb7 )
by Laurent
12:51 queued 09:39
created

OrdersArticles   A

Complexity

Total Complexity 14

Size/Duplication

Total Lines 207
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 14
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 207
rs 10

14 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getId() 0 4 1
A setQuantity() 0 6 1
A getQuantity() 0 4 1
A setPrice() 0 6 1
A getPrice() 0 4 1
A setOrders() 0 6 1
A getOrders() 0 4 1
A setArticle() 0 6 1
A getArticle() 0 4 1
A setUnitStorage() 0 6 1
A getUnitStorage() 0 4 1
A setTva() 0 6 1
A getTva() 0 4 1
1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use AppBundle\Entity\Orders;
7
8
/**
9
 * OrdersArticles
10
 *
11
 * @ORM\Table(name="gs_orders_articles")
12
 * @ORM\Entity(repositoryClass="AppBundle\Entity\OrdersArticlesRepository")
13
 */
14
class OrdersArticles
15
{
16
    /**
17
     * @var integer
18
     *
19
     * @ORM\Column(name="id", type="integer")
20
     * @ORM\Id
21
     * @ORM\GeneratedValue(strategy="AUTO")
22
     */
23
    private $id;
24
25
    /**
26
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Orders", inversedBy="articles")
27
     * @ORM\JoinColumn(nullable=false)
28
     */
29
    private $orders;
30
31
    /**
32
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Article")
33
     * @ORM\JoinColumn(nullable=false)
34
     */
35
    private $article;
36
37
    /**
38
     * @var decimal Quantité de la commande
39
     *
40
     * @ORM\Column(name="quantity", type="decimal", precision=7, scale=3)
41
     */
42
    private $quantity;
43
44
    /**
45
     * @var string|\AppBundle\Entity\UnitStorage Unité de stockage
46
     *
47
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\UnitStorage")
48
     * @ORM\JoinColumn(nullable=false)
49
     */
50
    private $unitStorage;
51
52
    /**
53
     * @var decimal Prix de l'article
54
     *
55
     * @ORM\Column(name="price", type="decimal", precision=7, scale=3, nullable=true)
56
     */
57
    private $price;
58
59
    /**
60
     * @var string|\AppBundle\Entity\Tva TVA
61
     *
62
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Tva")
63
     * @ORM\JoinColumn(nullable=false)
64
     */
65
    private $tva;
66
67
68
    public function __construct()
69
    {
70
        $this->quantity = 0;
0 ignored issues
show
Documentation Bug introduced by
It seems like 0 of type integer is incompatible with the declared type object<AppBundle\Entity\decimal> of property $quantity.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
71
    }
72
73
    /**
74
     * Get id
75
     *
76
     * @return integer
77
     */
78
    public function getId()
79
    {
80
        return $this->id;
81
    }
82
83
    /**
84
     * Set quantity
85
     *
86
     * @param string $quantity
87
     * @return OrdersArticles
88
     */
89
    public function setQuantity($quantity)
90
    {
91
        $this->quantity = $quantity;
0 ignored issues
show
Documentation Bug introduced by
It seems like $quantity of type string is incompatible with the declared type object<AppBundle\Entity\decimal> of property $quantity.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
92
93
        return $this;
94
    }
95
96
    /**
97
     * Get quantity
98
     *
99
     * @return string
100
     */
101
    public function getQuantity()
102
    {
103
        return $this->quantity;
104
    }
105
106
    /**
107
     * Set price
108
     *
109
     * @param string $price
110
     * @return OrdersArticles
111
     */
112
    public function setPrice($price)
113
    {
114
        $this->price = $price;
0 ignored issues
show
Documentation Bug introduced by
It seems like $price of type string is incompatible with the declared type object<AppBundle\Entity\decimal> of property $price.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
115
116
        return $this;
117
    }
118
119
    /**
120
     * Get price
121
     *
122
     * @return string
123
     */
124
    public function getPrice()
125
    {
126
        return $this->price;
127
    }
128
129
    /**
130
     * Set orders
131
     *
132
     * @param \AppBundle\Entity\Orders $orders
133
     * @return OrdersArticles
134
     */
135
    public function setOrders(Orders $orders)
136
    {
137
        $this->orders = $orders;
138
139
        return $this;
140
    }
141
142
    /**
143
     * Get orders
144
     *
145
     * @return \AppBundle\Entity\Orders
146
     */
147
    public function getOrders()
148
    {
149
        return $this->orders;
150
    }
151
152
    /**
153
     * Set article
154
     *
155
     * @param \AppBundle\Entity\Article $article
156
     * @return OrdersArticles
157
     */
158
    public function setArticle(\AppBundle\Entity\Article $article)
159
    {
160
        $this->article = $article;
161
162
        return $this;
163
    }
164
165
    /**
166
     * Get article
167
     *
168
     * @return \AppBundle\Entity\Article
169
     */
170
    public function getArticle()
171
    {
172
        return $this->article;
173
    }
174
175
    /**
176
     * Set unitStorage
177
     *
178
     * @param \AppBundle\Entity\UnitStorage $unitStorage
179
     * @return OrdersArticles
180
     */
181
    public function setUnitStorage(\AppBundle\Entity\UnitStorage $unitStorage)
182
    {
183
        $this->unitStorage = $unitStorage;
184
185
        return $this;
186
    }
187
188
    /**
189
     * Get unitStorage
190
     *
191
     * @return \AppBundle\Entity\UnitStorage
192
     */
193
    public function getUnitStorage()
194
    {
195
        return $this->unitStorage;
196
    }
197
198
    /**
199
     * Set tva
200
     *
201
     * @param \AppBundle\Entity\Tva $tva
202
     * @return OrdersArticles
203
     */
204
    public function setTva(\AppBundle\Entity\Tva $tva)
205
    {
206
        $this->tva = $tva;
207
208
        return $this;
209
    }
210
211
    /**
212
     * Get tva
213
     *
214
     * @return \AppBundle\Entity\Tva
215
     */
216
    public function getTva()
217
    {
218
        return $this->tva;
219
    }
220
}
221