Passed
Push — master ( b45034...83eef8 )
by
unknown
03:50 queued 01:25
created

BadUriPrefixException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A getSolution() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\Middleware\Exception;
6
7
use Exception;
8
use Yiisoft\FriendlyException\FriendlyExceptionInterface;
9
10
final class BadUriPrefixException extends Exception implements FriendlyExceptionInterface
11
{
12 2
    public function getName(): string
13
    {
14 2
        return 'Bad URI prefix';
15
    }
16
17
    public function getSolution(): ?string
18
    {
19
        return <<<SOLUTION
20
Most likely you have specified the wrong URI prefix.
21
Make sure that path from the web address contains the specified prefix (immediately after the domain part).
22
The prefix value usually begins with a slash and must not end with a slash.
23
The prefix should be exact match. We're not trimming it or adding anything to it.
24
SOLUTION;
25
    }
26
}
27