CartItemMeta::getItemNumber()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace SpeckCatalog\Model;
4
5
class CartItemMeta
6
{
7
    protected $parentOptionId;
8
    protected $productId;
9
    protected $itemNumber;
10
    protected $parentOptionName;
11
    protected $flatOptions = array();
12
    protected $image;
13
    protected $uom;
14
15
    public function __construct(array $config = array())
16
    {
17
        if (count($config)) {
18
            $this->parentOptionId   = isset($config['parent_option_id'])   ? $config['parent_option_id']   : null;
19
            $this->productId        = isset($config['product_id'])         ? $config['product_id']         : null;
20
            $this->itemNumber       = isset($config['item_number'])        ? $config['item_number']        : null;
21
            $this->parentOptionName = isset($config['parent_option_name']) ? $config['parent_option_name'] : null;
22
            $this->flatOptions      = isset($config['flat_options'])       ? $config['flat_options']       : array();
23
            $this->image            = isset($config['image'])              ? $config['image']              : null;
24
            $this->uom              = isset($config['uom'])                ? $config['uom']                : null;
25
        }
26
    }
27
28
    /**
29
     * Get parentOptionId.
30
     *
31
     * @return parentOptionId.
0 ignored issues
show
Documentation introduced by
The doc-type parentOptionId. could not be parsed: Unknown type name "parentOptionId." at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
32
     */
33
    public function getParentOptionId()
34
    {
35
        return $this->parentOptionId;
36
    }
37
38
    /**
39
     * Set parentOptionId.
40
     *
41
     * @param parentOptionId the value to set.
42
     */
43
    public function setParentOptionId($parentOptionId)
44
    {
45
        $this->parentOptionId = $parentOptionId;
46
        return $this;
47
    }
48
49
    /**
50
     * Get parentOptionName.
51
     *
52
     * @return parentOptionName.
0 ignored issues
show
Documentation introduced by
The doc-type parentOptionName. could not be parsed: Unknown type name "parentOptionName." at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
53
     */
54
    public function getParentOptionName()
55
    {
56
        return $this->parentOptionName;
57
    }
58
59
    /**
60
     * Set parentOptionName.
61
     *
62
     * @param parentOptionName the value to set.
63
     */
64
    public function setParentOptionName($parentOptionName)
65
    {
66
        $this->parentOptionName = $parentOptionName;
67
        return $this;
68
    }
69
70
    /**
71
     * Get image.
72
     *
73
     * @return image.
0 ignored issues
show
Documentation introduced by
The doc-type image. could not be parsed: Unknown type name "image." at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
74
     */
75
    public function getImage()
76
    {
77
        return $this->image;
78
    }
79
80
    /**
81
     * Set image.
82
     *
83
     * @param image the value to set.
84
     */
85
    public function setImage($image)
86
    {
87
        $this->image = $image;
88
        return $this;
89
    }
90
91
    /**
92
     * Get productId.
93
     *
94
     * @return productId.
0 ignored issues
show
Documentation introduced by
The doc-type productId. could not be parsed: Unknown type name "productId." at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
95
     */
96
    public function getProductId()
97
    {
98
        return $this->productId;
99
    }
100
101
    /**
102
     * Set productId.
103
     *
104
     * @param productId the value to set.
105
     */
106
    public function setProductId($productId)
107
    {
108
        $this->productId = $productId;
109
        return $this;
110
    }
111
112
    /**
113
     * Get flatOptions.
114
     *
115
     * @return flatOptions.
0 ignored issues
show
Documentation introduced by
The doc-type flatOptions. could not be parsed: Unknown type name "flatOptions." at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
116
     */
117
    public function getFlatOptions()
118
    {
119
        return $this->flatOptions;
120
    }
121
122
    /**
123
     * Set flatOptions.
124
     *
125
     * @param flatOptions the value to set.
126
     */
127
    public function setFlatOptions($flatOptions)
128
    {
129
        $this->flatOptions = $flatOptions;
0 ignored issues
show
Documentation Bug introduced by
It seems like $flatOptions of type object<SpeckCatalog\Model\the> is incompatible with the declared type array of property $flatOptions.

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...
130
        return $this;
131
    }
132
133
    /**
134
     * @return itemNumber
135
     */
136
    public function getItemNumber()
137
    {
138
        return $this->itemNumber;
139
    }
140
141
    /**
142
     * @param $itemNumber
143
     * @return self
144
     */
145
    public function setItemNumber($itemNumber)
146
    {
147
        $this->itemNumber = $itemNumber;
148
        return $this;
149
    }
150
151
    /**
152
     * @return uom
153
     */
154
    public function getUom()
155
    {
156
        return $this->uom;
157
    }
158
159
    /**
160
     * @param $uom
161
     * @return self
162
     */
163
    public function setUom($uom)
164
    {
165
        $this->uom = $uom;
166
        return $this;
167
    }
168
}
169