Passed
Push — master ( 35c30e...6daa1b )
by Przemysław eRIZ
04:42
created

AddWishlistProduct   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 36
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 setSelected() 0 3 1
A setWishlistProduct() 0 3 1
A setCartItem() 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
class AddWishlistProduct
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