Passed
Push — master ( 41e710...91ffae )
by Aleksei
06:19 queued 21s
created

ScopeException::getScope()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Core\Exception\Scope;
6
7
use Spiral\Core\Exception\Container\ContainerException;
8
9
/**
10
 * @internal
11
 */
12
abstract class ScopeException extends ContainerException
13
{
14 2
    public function __construct(
15
        protected ?string $scope,
16
        string $message = '',
17
        int $code = 0,
18
        ?\Throwable $previous = null,
19
    ) {
20 2
        parent::__construct(
21 2
            $message,
22 2
            $code,
23 2
            $previous,
24 2
        );
25
    }
26
27
    public function getScope(): ?string
28
    {
29
        return $this->scope;
30
    }
31
}
32