Product::setName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace SpeckCatalog\Model;
4
5
class Product extends AbstractModel
6
{
7
    protected $productId;
8
    protected $name;
9
    protected $description;
10
    protected $manufacturerId;
11
    protected $itemNumber;
12
    protected $productTypeId = 2;
13
    protected $enabled = 1;
14
15
    /**
16
     * @return productId
17
     */
18 7
    public function getProductId()
19
    {
20 7
        return $this->productId;
21
    }
22
23
    /**
24
     * @param $productId
25
     * @return self
26
     */
27 6
    public function setProductId($productId)
28
    {
29 6
        $this->productId = (int) $productId;
30 6
        return $this;
31
    }
32
33
    /**
34
     * @return name
35
     */
36 3
    public function getName()
37
    {
38 3
        return $this->name;
39
    }
40
41
    /**
42
     * @param $name
43
     * @return self
44
     */
45 4
    public function setName($name)
46
    {
47 4
        $this->name = $name;
48 4
        return $this;
49
    }
50
51
    /**
52
     * @return description
53
     */
54 3
    public function getDescription()
55
    {
56 3
        return $this->description;
57
    }
58
59
    /**
60
     * @param $description
61
     * @return self
62
     */
63 2
    public function setDescription($description)
64
    {
65 2
        $this->description = $description;
66 2
        return $this;
67
    }
68
69
    /**
70
     * @return manufacturerId
71
     */
72 3
    public function getManufacturerId()
73
    {
74 3
        return $this->manufacturerId;
75
    }
76
77
    /**
78
     * @param $manufacturerId
79
     * @return self
80
     */
81 4
    public function setManufacturerId($manufacturerId)
82
    {
83 4
        $this->manufacturerId = $manufacturerId;
84 4
        return $this;
85
    }
86
87
    /**
88
     * @return itemNumber
89
     */
90 3
    public function getItemNumber()
91
    {
92 3
        return $this->itemNumber;
93
    }
94
95
    /**
96
     * @param $itemNumber
97
     * @return self
98
     */
99 2
    public function setItemNumber($itemNumber)
100
    {
101 2
        $this->itemNumber = $itemNumber;
102 2
        return $this;
103
    }
104
105
    /**
106
     * @return productTypeId
107
     */
108 3
    public function getProductTypeId()
109
    {
110 3
        return $this->productTypeId;
111
    }
112
113
    /**
114
     * @param $productTypeId
115
     * @return self
116
     */
117 2
    public function setProductTypeId($productTypeId)
118
    {
119 2
        $this->productTypeId = (int) $productTypeId;
120 2
        return $this;
121
    }
122
123
    /**
124
     * @return enabled
125
     */
126 3
    public function getEnabled()
127
    {
128 3
        return $this->enabled;
129
    }
130
131
    /**
132
     * @param $enabled
133
     * @return self
134
     */
135
    public function setEnabled($enabled)
136
    {
137
        $this->enabled = $enabled;
138
        return $this;
139
    }
140
}
141