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

ScopeException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 2
eloc 6
dl 0
loc 18
ccs 6
cts 8
cp 0.75
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A getScope() 0 3 1
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