Completed
Push — master ( cab61f...655000 )
by Matthias
11s
created

ProductIsNotAProductBundleException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 4
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * Created by solutionDrive GmbH.
7
 *
8
 * @copyright 2018 solutionDrive GmbH
9
 */
10
11
namespace solutionDrive\SyliusProductBundlesPlugin\Exception;
12
13
use Sylius\Component\Core\Model\ProductInterface;
14
use Throwable;
15
16
class ProductIsNotAProductBundleException extends \RuntimeException
17
{
18
    /** @var ProductInterface */
19
    private $product;
20
21
    public function __construct(
22
        ProductInterface $product,
23
        string $message = '',
24
        int $code = 0,
25
        Throwable $previous = null
26
    ) {
27
        parent::__construct($message, $code, $previous);
28
        $this->product = $product;
29
    }
30
31
    public function getProduct(): ProductInterface
32
    {
33
        return $this->product;
34
    }
35
}
36