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