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

BadScopeException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Core\Exception\Scope;
6
7
/**
8
 * @method string getScope()
9
 */
10
final class BadScopeException extends ScopeException
11
{
12
    public function __construct(
13
        string $scope,
14
        protected string $className,
15
    ) {
16
        parent::__construct(
17
            $scope,
18
            \sprintf('Class `%s` can be resolved only in `%s` scope.', $className, $scope),
19
        );
20
    }
21
}
22