ProductIsNotAProductBundleException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getProduct() 0 4 1
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