Passed
Pull Request — master (#87)
by
unknown
05:50
created

AddWishlistProduct::isSelected()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
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
final class AddWishlistProduct implements AddWishlistProductInterface
17
{
18
    /** @var WishlistProductInterface  */
19
    private WishlistProductInterface $wishlistProduct;
20
21
    /** @var AddToCartCommandInterface  */
22
    private AddToCartCommandInterface $cartItem;
23
24
    private bool $selected;
25
26
    public function getWishlistProduct(): WishlistProductInterface
27
    {
28
        return $this->wishlistProduct;
29
    }
30
31
    public function setWishlistProduct(WishlistProductInterface $wishlistProduct): void
32
    {
33
        $this->wishlistProduct = $wishlistProduct;
34
    }
35
36
    public function isSelected(): bool
37
    {
38
        return $this->selected;
39
    }
40
41
    public function setSelected(bool $selected): void
42
    {
43
        $this->selected = $selected;
44
    }
45
46
    public function getCartItem(): AddToCartCommandInterface
47
    {
48
        return $this->cartItem;
49
    }
50
51
    public function setCartItem(AddToCartCommandInterface $cartItem): void
52
    {
53
        $this->cartItem = $cartItem;
54
    }
55
56
}