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