Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
Error
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Cosray\Config;
6
7use Celemas\Core\Error\Renderer;
8
9final class Error
10{
11    public function __construct(
12        private readonly \Cosray\Config $config,
13    ) {}
14
15    public bool $enabled {
16        get => $this->config->get('error.enabled');
17    }
18
19    /** @var null|class-string<Renderer>|Renderer */
20    public string|Renderer|null $renderer {
21        get => $this->config->get('error.renderer');
22    }
23
24    /** @var list<class-string> */
25    public array $trusted {
26        get => $this->config->get('error.trusted');
27    }
28
29    /** @var null|non-empty-string|list<non-empty-string> */
30    public string|array|null $views {
31        get => $this->config->get('error.views');
32    }
33
34    public bool $whoops {
35        get => $this->config->get('error.whoops');
36    }
37}