SlotNotFoundException::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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
    /** @var string */
19
    private $name;
20
21
    /** @var ProductBundleInterface */
22
    private $bundle;
23
24
    public function __construct(
25
        string $slotName,
26
        ProductBundleInterface $bundle,
27
        string $message = '',
28
        int $code = 0,
29
        Throwable $previous = null
30
    ) {
31
        parent::__construct($message, $code, $previous);
32
        $this->name = $slotName;
33
        $this->bundle = $bundle;
34
    }
35
36
    public function getName(): string
37
    {
38
        return $this->name;
39
    }
40
41
    public function getBundle(): ProductBundleInterface
42
    {
43
        return $this->bundle;
44
    }
45
}
46