Completed
Push — master ( 175f05...5ac193 )
by Bukashk0zzz
04:34
created

OfferSimple   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 94
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 8
lcom 1
cbo 1
dl 0
loc 94
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 4 1
A getName() 0 4 1
A setName() 0 6 1
A getVendor() 0 4 1
A setVendor() 0 6 1
A getVendorCode() 0 4 1
A setVendorCode() 0 6 1
A getOptions() 0 8 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 OfferSimple
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 string
28
     */
29
    private $vendor;
30
31
    /**
32
     * @var string
33
     */
34
    private $vendorCode;
35
36
    /**
37
     * @return string
38
     */
39
    public function getType()
40
    {
41
        return null;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getName()
48
    {
49
        return $this->name;
50
    }
51
52
    /**
53
     * @param string $name
54
     * @return $this
55
     */
56
    public function setName($name)
57
    {
58
        $this->name = $name;
59
60
        return $this;
61
    }
62
63
    /**
64
     * @return string
65
     */
66
    public function getVendor()
67
    {
68
        return $this->vendor;
69
    }
70
71
    /**
72
     * @param string $vendor
73
     * @return $this
74
     */
75
    public function setVendor($vendor)
76
    {
77
        $this->vendor = $vendor;
78
79
        return $this;
80
    }
81
82
    /**
83
     * @return string
84
     */
85
    public function getVendorCode()
86
    {
87
        return $this->vendorCode;
88
    }
89
90
    /**
91
     * @param string $vendorCode
92
     * @return $this
93
     */
94
    public function setVendorCode($vendorCode)
95
    {
96
        $this->vendorCode = $vendorCode;
97
98
        return $this;
99
    }
100
101
    /**
102
     * @return array
103
     */
104
    protected function getOptions()
105
    {
106
        return [
107
            'name' => $this->getName(),
108
            'vendor' => $this->getVendor(),
109
            'vendorCode' => $this->getVendorCode(),
110
        ];
111
    }
112
}
113