Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Path | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Cosray\Config; |
| 6 | |
| 7 | final class Path |
| 8 | { |
| 9 | public function __construct( |
| 10 | private readonly \Cosray\Config $config, |
| 11 | ) {} |
| 12 | |
| 13 | /** @var non-empty-string */ |
| 14 | public string $root { |
| 15 | get => $this->config->get('path.root'); |
| 16 | } |
| 17 | |
| 18 | /** @var non-empty-string */ |
| 19 | public string $public { |
| 20 | get => $this->config->get('path.public'); |
| 21 | } |
| 22 | |
| 23 | public string $prefix { |
| 24 | get => $this->config->get('path.prefix'); |
| 25 | } |
| 26 | |
| 27 | /** @var non-empty-string */ |
| 28 | public string $assets { |
| 29 | get => $this->config->get('path.assets'); |
| 30 | } |
| 31 | |
| 32 | /** @var non-empty-string */ |
| 33 | public string $cache { |
| 34 | get => $this->config->get('path.cache'); |
| 35 | } |
| 36 | |
| 37 | /** @var non-empty-string */ |
| 38 | public string $views { |
| 39 | get => $this->config->get('path.views'); |
| 40 | } |
| 41 | |
| 42 | /** @var non-empty-string */ |
| 43 | public string $panel { |
| 44 | get => $this->config->get('path.panel'); |
| 45 | } |
| 46 | |
| 47 | /** @var ?non-empty-string */ |
| 48 | public ?string $api { |
| 49 | get => $this->config->get('path.api'); |
| 50 | } |
| 51 | } |