Test Failed
Pull Request — master (#870)
by Aleksei
08:56
created

ScopeException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 6
c 0
b 0
f 0
dl 0
loc 18
rs 10

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
    public function __construct(
15
        protected ?string $scope,
16
        string $message = '',
17
        int $code = 0,
18
        ?\Throwable $previous = null,
19
    ) {
20
        parent::__construct(
21
            $message,
22
            $code,
23
            $previous,
24
        );
25
    }
26
27
    public function getScope(): ?string
28
    {
29
        return $this->scope;
30
    }
31
}
32