Cart   A
last analyzed

Complexity

Total Complexity 13

Size/Duplication

Total Lines 204
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 26
dl 0
loc 204
rs 10
c 0
b 0
f 0
wmc 13

13 Methods

Rating   Name   Duplication   Size   Complexity  
A getCartItemList() 0 3 1
A getId() 0 3 1
A setOrder() 0 5 1
A setId() 0 5 1
A getOrder() 0 3 1
A getCreatedAt() 0 3 1
A setCartItemList() 0 5 1
A getClientPhoneNumber() 0 3 1
A setClientPhoneNumber() 0 5 1
A setCreatedAt() 0 5 1
A setStatus() 0 5 1
A addCartItemList() 0 3 1
A getStatus() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Mapado\RestClientSdk\Tests\Model\JsonLd;
6
7
use DateTime;
8
use Mapado\RestClientSdk\Mapping\Annotations as Rest;
9
10
/**
11
 * Class Cart
12
 *
13
 * @author Julien Deniau <[email protected]>
14
 *
15
 * @Rest\Entity(key="cart")
16
 */
17
class Cart
18
{
19
    /**
20
     * id
21
     *
22
     * @var mixed
23
     *
24
     * @Rest\Id
25
     * @Rest\Attribute(name="id", type="string")
26
     */
27
    private $id;
28
29
    /**
30
     * status
31
     *
32
     * @var mixed
33
     *
34
     * @Rest\Attribute(name="status", type="string")
35
     */
36
    private $status;
37
38
    /**
39
     * createdAt
40
     *
41
     * @var mixed
42
     *
43
     * @Rest\Attribute(name="created_at", type="datetime")
44
     */
45
    private $createdAt;
46
47
    /**
48
     * cartItemList
49
     *
50
     * @var mixed
51
     *
52
     * @Rest\OneToMany(name="cart_items", targetEntity="CartItem")
53
     */
54
    private $cartItemList = [];
55
56
    /**
57
     * clientPhoneNumber
58
     *
59
     * @var string
60
     *
61
     * @Rest\Attribute(name="clientPhoneNumber", type="phone_number")
62
     */
63
    private $clientPhoneNumber;
64
65
    /**
66
     * order
67
     *
68
     * @var mixed
69
     *
70
     * @Rest\ManyToOne(name="order", targetEntity="Order")
71
     */
72
    private $order = null;
73
74
    /**
75
     * Getter for id
76
     *
77
     * @return string
78
     */
79
    public function getId()
80
    {
81
        return $this->id;
82
    }
83
84
    /**
85
     * Setter for id
86
     *
87
     * @param string $id
88
     *
89
     * @return Cart
90
     */
91
    public function setId($id)
92
    {
93
        $this->id = $id;
94
95
        return $this;
96
    }
97
98
    /**
99
     * Getter for status
100
     *
101
     * @return string
102
     */
103
    public function getStatus()
104
    {
105
        return $this->status;
106
    }
107
108
    /**
109
     * Setter for status
110
     *
111
     * @param string $status
112
     *
113
     * @return Cart
114
     */
115
    public function setStatus($status)
116
    {
117
        $this->status = $status;
118
119
        return $this;
120
    }
121
122
    /**
123
     * Getter for createdAt
124
     *
125
     * @return DateTime
126
     */
127
    public function getCreatedAt()
128
    {
129
        return $this->createdAt;
130
    }
131
132
    /**
133
     * Setter for createdAt
134
     *
135
     * @param DateTime $createdAt
136
     *
137
     * @return Cart
138
     */
139
    public function setCreatedAt(DateTime $createdAt)
140
    {
141
        $this->createdAt = $createdAt;
142
143
        return $this;
144
    }
145
146
    /**
147
     * Getter for cartItemList
148
     *
149
     * @return array
150
     */
151
    public function getCartItemList()
152
    {
153
        return $this->cartItemList;
154
    }
155
156
    /**
157
     * Setter for cartItemList
158
     *
159
     * @param array $cartItemList
160
     *
161
     * @return Cart
162
     */
163
    public function setCartItemList($cartItemList)
164
    {
165
        $this->cartItemList = $cartItemList;
166
167
        return $this;
168
    }
169
170
    public function addCartItemList($cartItem)
171
    {
172
        $this->cartItemList[] = $cartItem;
173
    }
174
175
    /**
176
     * Getter for clientPhoneNumber
177
     *
178
     * @return string
179
     */
180
    public function getClientPhoneNumber()
181
    {
182
        return $this->clientPhoneNumber;
183
    }
184
185
    /**
186
     * Setter for clientPhoneNumber
187
     *
188
     * @param string $clientPhoneNumber
189
     *
190
     * @return Cart
191
     */
192
    public function setClientPhoneNumber($clientPhoneNumber)
193
    {
194
        $this->clientPhoneNumber = $clientPhoneNumber;
195
196
        return $this;
197
    }
198
199
    /**
200
     * Getter for order
201
     *
202
     * @return string
203
     */
204
    public function getOrder()
205
    {
206
        return $this->order;
207
    }
208
209
    /**
210
     * Setter for order
211
     *
212
     * @param string $order
213
     *
214
     * @return Cart
215
     */
216
    public function setOrder($order)
217
    {
218
        $this->order = $order;
219
220
        return $this;
221
    }
222
}
223