Passed
Push — master ( 3c19d1...2ca449 )
by Evgenii
09:11
created

Item   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 78
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 19
c 0
b 0
f 0
dl 0
loc 78
ccs 18
cts 18
cp 1
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setBarcode() 0 4 1
A setTitle() 0 4 1
A setQuantity() 0 4 1
A setweight() 0 4 1
A setRetprice() 0 4 1
A setArticle() 0 4 1
1
<?php
2
3
4
namespace floor12\DalliApi\Models;
5
6
7
class Item extends BaseXmlObject
8
{
9
    /** @var string */
10
    public $title;
11
    /** @var int */
12
    public $_quantity = 1;
13
    /** @var int */
14
    public $_weight;
15
    /** @var int */
16
    public $_retprice;
17
    /** @var int */
18
    public $_barcode;
19
    /** @var string */
20
    public $_article;
21
22
23
    /**
24
     * @param int $quantity
25
     * @return Item
26
     */
27 2
    public function setQuantity(int $quantity)
28
    {
29 2
        $this->_quantity = $quantity;
30 2
        return $this;
31
    }
32
33
    /**
34
     * @param int $_weight
35
     * @return Item
36
     * @return Item
37
     */
38 2
    public function setweight(int $_weight)
39
    {
40 2
        $this->_weight = $_weight;
41 2
        return $this;
42
    }
43
44
    /**
45
     * @param int $retprice
46
     * @return Item
47
     * @return Item
48
     */
49 2
    public function setRetprice(int $retprice)
50
    {
51 2
        $this->_retprice = $retprice;
52 2
        return $this;
53
    }
54
55
    /**
56
     * @param int $_barcode
57
     * @return Item
58
     * @return Item
59
     */
60 3
    public function setBarcode(int $_barcode)
61
    {
62 3
        $this->_barcode = $_barcode;
63 3
        return $this;
64
    }
65
66
    /**
67
     * @param string $_article
68
     * @return Item
69
     * @return Item
70
     */
71 1
    public function setArticle(string $_article)
72
    {
73 1
        $this->_article = $_article;
74 1
        return $this;
75
    }
76
77
    /**
78
     * @param string $title
79
     * @return self
80
     */
81 1
    public function setTitle(string $title): self
82
    {
83 1
        $this->title = $title;
84 1
        return $this;
85
    }
86
}
87