Completed
Push — master ( 0f7b01...b73efb )
by Bukashk0zzz
02:11
created

OfferSimple   A

Complexity

Total Complexity 18

Size/Duplication

Total Lines 224
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 18
lcom 1
cbo 1
dl 0
loc 224
rs 10
c 0
b 0
f 0

18 Methods

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 18 1
A getType() 0 4 1
A getName() 0 4 1
A setName() 0 6 1
A isDelivery() 0 4 1
A setDelivery() 0 6 1
A getLocalDeliveryCost() 0 4 1
A setLocalDeliveryCost() 0 6 1
A getVendor() 0 4 1
A setVendor() 0 6 1
A getVendorCode() 0 4 1
A setVendorCode() 0 6 1
A getDescription() 0 4 1
A setDescription() 0 6 1
A getCountryOfOrigin() 0 4 1
A setCountryOfOrigin() 0 6 1
A isAdult() 0 4 1
A setAdult() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the Bukashk0zzzYmlGenerator
5
 *
6
 * (c) Denis Golubovskiy <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Bukashk0zzz\YmlGenerator\Model\Offer;
13
14
/**
15
 * Class Offer
16
 *
17
 * @author Denis Golubovskiy <[email protected]>
18
 */
19
class OfferSimple extends AbstractOffer
20
{
21
    /**
22
     * @var string
23
     */
24
    private $name;
25
26
    /**
27
     * @var bool
28
     */
29
    private $delivery;
30
31
    /**
32
     * @var float
33
     */
34
    private $localDeliveryCost;
35
36
    /**
37
     * @var string
38
     */
39
    private $vendor;
40
41
    /**
42
     * @var string
43
     */
44
    private $vendorCode;
45
46
    /**
47
     * @var string
48
     */
49
    private $description;
50
51
    /**
52
     * @var string
53
     */
54
    private $countryOfOrigin;
55
56
    /**
57
     * @var bool
58
     */
59
    private $adult;
60
61
    /**
62
     * @return array
63
     */
64
    public function toArray()
65
    {
66
        return [
67
            'url' => $this->getUrl(),
68
            'price' => $this->getPrice(),
69
            'currencyId' => $this->getCurrencyId(),
70
            'categoryId' => $this->getCategoryId(),
71
72
            'delivery' => $this->isDelivery(),
73
            'local_delivery_cost' => $this->getLocalDeliveryCost(),
74
            'name' => $this->getName(),
75
            'vendor' => $this->getVendor(),
76
            'vendorCode' => $this->getVendorCode(),
77
            'description' => $this->getDescription(),
78
            'country_of_origin' => $this->getCountryOfOrigin(),
79
            'adult' => $this->isAdult(),
80
        ];
81
    }
82
83
    /**
84
     * @return string
85
     */
86
    public function getType()
87
    {
88
        return null;
89
    }
90
91
    /**
92
     * @return string
93
     */
94
    public function getName()
95
    {
96
        return $this->name;
97
    }
98
99
    /**
100
     * @param string $name
101
     * @return $this
102
     */
103
    public function setName($name)
104
    {
105
        $this->name = $name;
106
107
        return $this;
108
    }
109
110
    /**
111
     * @return boolean
112
     */
113
    public function isDelivery()
114
    {
115
        return $this->delivery;
116
    }
117
118
    /**
119
     * @param boolean $delivery
120
     * @return $this
121
     */
122
    public function setDelivery($delivery)
123
    {
124
        $this->delivery = $delivery;
125
126
        return $this;
127
    }
128
129
    /**
130
     * @return float
131
     */
132
    public function getLocalDeliveryCost()
133
    {
134
        return $this->localDeliveryCost;
135
    }
136
137
    /**
138
     * @param float $localDeliveryCost
139
     * @return $this
140
     */
141
    public function setLocalDeliveryCost($localDeliveryCost)
142
    {
143
        $this->localDeliveryCost = $localDeliveryCost;
144
145
        return $this;
146
    }
147
148
    /**
149
     * @return string
150
     */
151
    public function getVendor()
152
    {
153
        return $this->vendor;
154
    }
155
156
    /**
157
     * @param string $vendor
158
     * @return $this
159
     */
160
    public function setVendor($vendor)
161
    {
162
        $this->vendor = $vendor;
163
164
        return $this;
165
    }
166
167
    /**
168
     * @return string
169
     */
170
    public function getVendorCode()
171
    {
172
        return $this->vendorCode;
173
    }
174
175
    /**
176
     * @param string $vendorCode
177
     * @return $this
178
     */
179
    public function setVendorCode($vendorCode)
180
    {
181
        $this->vendorCode = $vendorCode;
182
183
        return $this;
184
    }
185
186
    /**
187
     * @return string
188
     */
189
    public function getDescription()
190
    {
191
        return $this->description;
192
    }
193
194
    /**
195
     * @param string $description
196
     * @return $this
197
     */
198
    public function setDescription($description)
199
    {
200
        $this->description = $description;
201
202
        return $this;
203
    }
204
205
    /**
206
     * @return string
207
     */
208
    public function getCountryOfOrigin()
209
    {
210
        return $this->countryOfOrigin;
211
    }
212
213
    /**
214
     * @param string $countryOfOrigin
215
     * @return $this
216
     */
217
    public function setCountryOfOrigin($countryOfOrigin)
218
    {
219
        $this->countryOfOrigin = $countryOfOrigin;
220
221
        return $this;
222
    }
223
224
    /**
225
     * @return boolean
226
     */
227
    public function isAdult()
228
    {
229
        return $this->adult;
230
    }
231
232
    /**
233
     * @param boolean $adult
234
     * @return $this
235
     */
236
    public function setAdult($adult)
237
    {
238
        $this->adult = $adult;
239
240
        return $this;
241
    }
242
}
243