Passed
Pull Request — master (#88)
by
unknown
05:28
created

AddWishlistProduct   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 36
rs 10
c 2
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
3
declare(strict_types=1);
4
5
namespace BitBag\SyliusWishlistPlugin\Command\Wishlist;
6
7
use BitBag\SyliusWishlistPlugin\Entity\WishlistProductInterface;
8
use Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface;
9
10
class AddWishlistProduct
11
{
12
    private WishlistProductInterface $wishlistProduct;
13
14
    private AddToCartCommandInterface $cartItem;
15
16
    private bool $selected;
17
18
    public function getWishlistProduct(): WishlistProductInterface
19
    {
20
        return $this->wishlistProduct;
21
    }
22
23
    public function setWishlistProduct(WishlistProductInterface $wishlistProduct): void
24
    {
25
        $this->wishlistProduct = $wishlistProduct;
26
    }
27
28
    public function isSelected(): bool
29
    {
30
        return $this->selected;
31
    }
32
33
    public function setSelected(bool $selected): void
34
    {
35
        $this->selected = $selected;
36
    }
37
38
    public function getCartItem(): AddToCartCommandInterface
39
    {
40
        return $this->cartItem;
41
    }
42
43
    public function setCartItem(AddToCartCommandInterface $cartItem): void
44
    {
45
        $this->cartItem = $cartItem;
46
    }
47
}
48