Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
HttpUtilsTrait | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
httpUtils | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
setHttpUtils | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace Olz\Utils; |
4 | |
5 | use Symfony\Contracts\Service\Attribute\Required; |
6 | |
7 | trait HttpUtilsTrait { |
8 | protected function httpUtils(): HttpUtils { |
9 | $util = WithUtilsCache::get('httpUtils'); |
10 | assert($util); |
11 | return $util; |
12 | } |
13 | |
14 | #[Required] |
15 | public function setHttpUtils(HttpUtils $new): void { |
16 | WithUtilsCache::set('httpUtils', $new); |
17 | } |
18 | } |