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

AddWishlistProduct   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
c 2
b 0
f 0
dl 0
loc 38
rs 10
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
/*
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
}