Passed
Pull Request — master (#58)
by
unknown
13:18 queued 09:31
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 getWishlistTokenValue() 0 3 1
A __construct() 0 3 1
A setWishListTokenValue() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BitBag\SyliusWishlistPlugin\Command\Wishlist;
6
7
final class AddProductToWishlist implements WishlistTokenValueAwareInterface
8
{
9
    public int $productId;
10
11
    private string $token;
12
13
    public function __construct(int $productId)
14
    {
15
        $this->productId = $productId;
16
    }
17
18
    public function getWishlistTokenValue(): string
19
    {
20
        return $this->token;
21
    }
22
23
    public function setWishListTokenValue(string $token): void
24
    {
25
        $this->token = $token;
26
    }
27
}
28