Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
66.67% |
2 / 3 |
|
66.67% |
2 / 3 |
CRAP | |
0.00% |
0 / 1 |
UrlHelper | |
66.67% |
2 / 3 |
|
66.67% |
2 / 3 |
3.33 | |
0.00% |
0 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
none | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getBasePath | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\Core\Web; |
6 | |
7 | use PeServer\Core\Web\IUrlHelper; |
8 | |
9 | class UrlHelper implements IUrlHelper |
10 | { |
11 | public function __construct( |
12 | private string $basePath |
13 | ) { |
14 | } |
15 | |
16 | #region function |
17 | |
18 | public static function none(): self |
19 | { |
20 | return new self(''); |
21 | } |
22 | |
23 | #endregion |
24 | |
25 | #region IUrlHelper |
26 | |
27 | public function getBasePath(): string |
28 | { |
29 | return $this->basePath; |
30 | } |
31 | |
32 | #endregion |
33 | } |