OrderItem   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 122
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 10
lcom 0
cbo 0
dl 0
loc 122
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A setName() 0 6 1
A getValue() 0 4 1
A setValue() 0 6 1
A getCount() 0 4 1
A setCount() 0 6 1
A getWeight() 0 4 1
A setWeight() 0 6 1
A getCategory() 0 4 1
A setCategory() 0 6 1
1
<?php
2
3
namespace PimpayBundle\Model;
4
5
/**
6
 * Class OrderItem
7
 * @package PimpayBundle\Model
8
 */
9
class OrderItem
10
{
11
    /**
12
     * @var string|null
13
     */
14
    private $name;
15
16
    /**
17
     * @var float|null
18
     */
19
    private $value;
20
21
    /**
22
     * @var integer|null
23
     */
24
    private $count;
25
26
    /**
27
     * @var float|null
28
     */
29
    private $weight;
30
31
    /**
32
     * @var string|null
33
     */
34
    private $category;
35
36
    /**
37
     * @return string|null
38
     */
39
    public function getName()
40
    {
41
        return $this->name;
42
    }
43
44
    /**
45
     * @param string|null $name
46
     * @return $this
47
     */
48
    public function setName(string $name = null)
49
    {
50
        $this->name = $name;
51
52
        return $this;
53
    }
54
55
    /**
56
     * @return float|null
57
     */
58
    public function getValue()
59
    {
60
        return $this->value;
61
    }
62
63
    /**
64
     * @param float|null $value
65
     * @return $this
66
     */
67
    public function setValue(float $value = null)
68
    {
69
        $this->value = $value;
70
71
        return $this;
72
    }
73
74
    /**
75
     * @return int|null
76
     */
77
    public function getCount()
78
    {
79
        return $this->count;
80
    }
81
82
    /**
83
     * @param int|null $count
84
     * @return $this
85
     */
86
    public function setCount(int $count = null)
87
    {
88
        $this->count = $count;
89
90
        return $this;
91
    }
92
93
    /**
94
     * @return float|null
95
     */
96
    public function getWeight()
97
    {
98
        return $this->weight;
99
    }
100
101
    /**
102
     * @param float|null $weight
103
     * @return $this
104
     */
105
    public function setWeight(float $weight = null)
106
    {
107
        $this->weight = $weight;
108
109
        return $this;
110
    }
111
112
    /**
113
     * @return string|null
114
     */
115
    public function getCategory()
116
    {
117
        return $this->category;
118
    }
119
120
    /**
121
     * @param string|null $category
122
     * @return $this
123
     */
124
    public function setCategory(string $category = null)
125
    {
126
        $this->category = $category;
127
128
        return $this;
129
    }
130
}
131