Passed
Pull Request — master (#81)
by
unknown
04:14
created

CopySelectedProductsToOtherWishlist   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 21
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getDestinedWishlistId() 0 3 1
A __construct() 0 4 1
A getWishlistProducts() 0 3 1
1
<?php
2
3
/*
4
 * This file has been created by developers from BitBag.
5
 * Feel free to contact us once you face any issues or want to start
6
 * You can find more information about us on https://bitbag.io and write us
7
 * an email on [email protected].
8
 */
9
10
declare(strict_types=1);
11
12
namespace BitBag\SyliusWishlistPlugin\Command\Wishlist;
13
14
use Doctrine\Common\Collections\Collection;
15
16
final class CopySelectedProductsToOtherWishlist
17
{
18
    /** @var Collection<WishlistItem> */
19
    private Collection $wishlistProducts;
20
21
    private int $destinedWishlistId;
22
23
    public function __construct(Collection $wishlistProducts, int $destinedWishlistId)
24
    {
25
        $this->wishlistProducts = $wishlistProducts;
26
        $this->destinedWishlistId = $destinedWishlistId;
27
    }
28
29
    public function getWishlistProducts(): Collection
30
    {
31
        return $this->wishlistProducts;
32
    }
33
34
    public function getDestinedWishlistId(): int
35
    {
36
        return $this->destinedWishlistId;
37
    }
38
}
39