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

SlotNotFoundException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 9
nc 1
nop 5
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