Passed
Pull Request — master (#88)
by
unknown
04:40
created

AddWishlistProduct   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 38
rs 10
c 1
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A isSelected() 0 3 1
A getCartItem() 0 3 1
A getWishlistProduct() 0 3 1
A setCartItem() 0 3 1
A setSelected() 0 3 1
A setWishlistProduct() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace BitBag\SyliusWishlistPlugin\Command\Wishlist;
5
6
use BitBag\SyliusWishlistPlugin\Entity\WishlistProductInterface;
7
use Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface;
8
use Sylius\Component\Core\Model\OrderItemInterface;
9
10
class AddWishlistProduct
11
{
12
    /** @var WishlistProductInterface  */
13
    private WishlistProductInterface $wishlistProduct;
14
15
    /** @var AddToCartCommandInterface  */
16
    private AddToCartCommandInterface $cartItem;
17
18
    private bool $selected;
19
20
    public function getWishlistProduct(): WishlistProductInterface
21
    {
22
        return $this->wishlistProduct;
23
    }
24
25
    public function setWishlistProduct(WishlistProductInterface $wishlistProduct): void
26
    {
27
        $this->wishlistProduct = $wishlistProduct;
28
    }
29
30
    public function isSelected(): bool
31
    {
32
        return $this->selected;
33
    }
34
35
    public function setSelected(bool $selected): void
36
    {
37
        $this->selected = $selected;
38
    }
39
40
    public function getCartItem(): AddToCartCommandInterface
41
    {
42
        return $this->cartItem;
43
    }
44
45
    public function setCartItem(AddToCartCommandInterface $cartItem): void
46
    {
47
        $this->cartItem = $cartItem;
48
    }
49
50
}
51
52