Passed
Pull Request — master (#1104)
by Maxim
12:14
created

InvalidRequestScopeException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
dl 0
loc 7
ccs 2
cts 2
cp 1
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Bootloader\Http\Exception;
6
7
use Psr\Http\Message\ServerRequestInterface;
8
use Spiral\Core\Container;
9
use Spiral\Core\Exception\Shared\InvalidContainerScopeException;
10
use Spiral\Framework\Spiral;
11
12
/**
13
 * The requested class depends on the {@see ServerRequestInterface} context which is not available in the
14
 * current container scope.
15
 * The {@see ServerRequestInterface} is usually available in the {@see Spiral::Http} or {@see Spiral::HttpRequest}
16
 * scopes.
17
 */
18
final class InvalidRequestScopeException extends InvalidContainerScopeException
19
{
20 3
    public function __construct(
21
        string $id,
22
        string|Container|null $scopeOrContainer = null,
23
    ) {
24 3
        parent::__construct($id, $scopeOrContainer, Spiral::Http->value);
25
    }
26
}
27