Completed
Push — master ( 714bc2...f165ae )
by Matthias
10s
created

SlotNotFoundException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 34
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A getName() 0 4 1
A getBundle() 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 solutionDrive\SyliusProductBundlesPlugin\Entity\ProductBundleInterface;
14
use Throwable;
15
16
class SlotNotFoundException extends \RuntimeException
17
{
18
    /**
19
     * @var string
20
     */
21
    private $name;
22
23
    /**
24
     * @var ProductBundleInterface
25
     */
26
    private $bundle;
27
28
    public function __construct(
29
        string $slotName,
30
        ProductBundleInterface $bundle,
31
        string $message = '',
32
        int $code = 0,
33
        Throwable $previous = null
34
    ) {
35
        parent::__construct($message, $code, $previous);
36
        $this->name = $slotName;
37
        $this->bundle = $bundle;
38
    }
39
40
    public function getName(): string
41
    {
42
        return $this->name;
43
    }
44
45
    public function getBundle(): ProductBundleInterface
46
    {
47
        return $this->bundle;
48
    }
49
}
50