Completed
Pull Request — master (#12)
by Michael
01:18
created

ProductIsNotAProductBundleException::getProduct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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