Passed
Pull Request — master (#61)
by
unknown
05:43
created

AddProductToWishlist   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getWishlist() 0 3 1
A setWishlist() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BitBag\SyliusWishlistPlugin\Command\Wishlist;
6
7
use BitBag\SyliusWishlistPlugin\Entity\WishlistInterface;
8
9
final class AddProductToWishlist implements WishlistTokenValueAwareInterface
10
{
11
    public int $productId;
12
13
    private WishlistInterface $wishlist;
14
15
    public function __construct(int $productId)
16
    {
17
        $this->productId = $productId;
18
    }
19
20
    public function getWishlist(): WishlistInterface
21
    {
22
        return $this->wishlist;
23
    }
24
25
    public function setWishlist(WishlistInterface $wishlist): void
26
    {
27
        $this->wishlist = $wishlist;
28
    }
29
}
30