CartItemDetail::setName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Mapado\RestClientSdk\Tests\Model\JsonLd;
6
7
/**
8
 * Class CartItemDetail
9
 *
10
 * @author Julien Deniau <[email protected]>
11
 */
12
class CartItemDetail
13
{
14
    private $id;
15
16
    private $name;
17
18
    private $cartItem;
19
20
    /**
21
     * Getter for id
22
     *
23
     * @return string
24
     */
25
    public function getId()
26
    {
27
        return $this->id;
28
    }
29
30
    /**
31
     * Setter for id
32
     *
33
     * @param string $id
34
     *
35
     * @return CartItemDetail
36
     */
37
    public function setId($id)
38
    {
39
        $this->id = $id;
40
41
        return $this;
42
    }
43
44
    /**
45
     * Getter for name
46
     *
47
     * @return string
48
     */
49
    public function getName()
50
    {
51
        return $this->name;
52
    }
53
54
    /**
55
     * Setter for name
56
     *
57
     * @param string $name
58
     *
59
     * @return CartItemDetail
60
     */
61
    public function setName($name)
62
    {
63
        $this->name = $name;
64
65
        return $this;
66
    }
67
68
    /**
69
     * Getter for cartItem
70
     *
71
     * @return CartItem
72
     */
73
    public function getCartItem()
74
    {
75
        return $this->cartItem;
76
    }
77
78
    /**
79
     * Setter for cartItem
80
     *
81
     * @param CartItem $cartItem
82
     *
83
     * @return CartItemDetail
84
     */
85
    public function setCartItem(CartItem $cartItem)
86
    {
87
        $this->cartItem = $cartItem;
88
        $cartItem->addCartItemDetailList($this);
89
90
        return $this;
91
    }
92
}
93