Passed
Push — master ( 6daa1b...44aa55 )
by Przemysław eRIZ
04:09
created

WishlistItem::getCartItem()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file was created by developers working at BitBag
5
 * Do you need more information about us and what we do? Visit our https://bitbag.io website!
6
 * We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career
7
*/
8
9
declare(strict_types=1);
10
11
namespace BitBag\SyliusWishlistPlugin\Command\Wishlist;
12
13
use BitBag\SyliusWishlistPlugin\Entity\WishlistProductInterface;
14
use Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface;
15
16
class WishlistItem implements WishlistItemInterface
17
{
18
    private ?WishlistProductInterface $wishlistProduct;
19
20
    private ?AddToCartCommandInterface $cartItem;
21
22
    private ?bool $selected;
23
24
    public function getWishlistProduct(): ?WishlistProductInterface
25
    {
26
        return $this->wishlistProduct;
27
    }
28
29
    public function setWishlistProduct(?WishlistProductInterface $wishlistProduct): void
30
    {
31
        $this->wishlistProduct = $wishlistProduct;
32
    }
33
34
    public function isSelected(): ?bool
35
    {
36
        return $this->selected;
37
    }
38
39
    public function setSelected(?bool $selected): void
40
    {
41
        $this->selected = $selected;
42
    }
43
44
    public function getCartItem(): ?AddToCartCommandInterface
45
    {
46
        return $this->cartItem;
47
    }
48
49
    public function setCartItem(?AddToCartCommandInterface $cartItem): void
50
    {
51
        $this->cartItem = $cartItem;
52
    }
53
}
54