Completed
Push — master ( 5bc6c3...0c8ba6 )
by Mikołaj
19:22
created

WishlistProduct::getVariant()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file has been created by developers from BitBag.
5
 * Feel free to contact us once you face any issues or want to start
6
 * another great project.
7
 * You can find more information about us on https://bitbag.shop and write us
8
 * an email on [email protected].
9
 */
10
11
declare(strict_types=1);
12
13
namespace BitBag\SyliusWishlistPlugin\Entity;
14
15
use Sylius\Component\Core\Model\ProductInterface;
16
use Sylius\Component\Core\Model\ProductVariantInterface;
17
18
class WishlistProduct implements WishlistProductInterface
19
{
20
    /** @var int */
21
    protected $id;
22
23
    /** @var WishlistInterface */
24
    protected $wishlist;
25
26
    /** @var ProductInterface */
27
    protected $product;
28
29
    /** @var ProductVariantInterface|null */
30
    protected $variant;
31
32
    /** @var int */
33
    protected $quantity = 0;
34
35
    public function getId(): ?int
36
    {
37
        return $this->id;
38
    }
39
40
    public function getWishlist(): WishlistInterface
41
    {
42
        return $this->wishlist;
43
    }
44
45
    public function setWishlist(WishlistInterface $wishlist): void
46
    {
47
        $this->wishlist = $wishlist;
48
    }
49
50
    public function getProduct(): ProductInterface
51
    {
52
        return $this->product;
53
    }
54
55
    public function setProduct(ProductInterface $product): void
56
    {
57
        $this->product = $product;
58
    }
59
60
    public function getVariant(): ?ProductVariantInterface
61
    {
62
        return $this->variant;
63
    }
64
65
    public function setVariant(?ProductVariantInterface $variant): void
66
    {
67
        $this->variant = $variant;
68
    }
69
70
    public function getQuantity(): int
71
    {
72
        return $this->quantity;
73
    }
74
75
    public function setQuantity(int $quantity): void
76
    {
77
        $this->quantity = $quantity;
78
    }
79
}
80