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

WishlistProductsActionFailedException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
c 2
b 0
f 0
dl 0
loc 17
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFailedProductsName() 0 3 1
A __construct() 0 5 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\Exception;
13
14
use Doctrine\Common\Collections\Collection;
15
use Sylius\Component\Resource\Repository\Exception\ExistingResourceException;
16
17
final class WishlistProductsActionFailedException extends ExistingResourceException
18
{
19
    private Collection $failedProductsName;
20
21
    /** @var string */
22
    protected $message;
23
24
    public function __construct(Collection $failedProducts, string $message)
25
    {
26
        parent::__construct();
27
        $this->failedProductsName = $failedProducts;
28
        $this->message = $message;
29
    }
30
31
    public function getFailedProductsName(): Collection
32
    {
33
        return $this->failedProductsName;
34
    }
35
}
36