Item::setWishlist()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/*
4
 * (c) Soeren Martius
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace SoerenMartius\Component\Wishlist\Model;
11
12
/**
13
 * @author Soeren Martius <[email protected]>
14
 */
15
class Item implements
16
    ItemInterface,
17
    Timestampable
18
{
19
    use TimestampableTrait;
20
21
    /**
22
     * @var mixed
23
     */
24
    protected $id;
25
26
    /**
27
     * @var WishlistInterface
28
     */
29
    protected $wishlist;
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function getId()
35
    {
36
        return $this->id;
37
    }
38
39
    /**
40
     * @param mixed $id
41
     *
42
     * @return ItemInterface
43
     */
44
    public function setId($id): ItemInterface
45
    {
46
        $this->id = $id;
47
48
        return $this;
49
    }
50
51
    /**
52
     * {@inheritdoc}
53
     */
54
    public function getWishlist()
55
    {
56
        return $this->wishlist;
57
    }
58
59
    /**
60
     * {@inheritdoc}
61
     */
62
    public function setWishlist(WishlistInterface $wishlist): ItemInterface
63
    {
64
        $this->wishlist = $wishlist;
65
66
        return $this;
67
    }
68
}
69