Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
33.33% covered (danger)
33.33%
1 / 3
50.00% covered (danger)
50.00%
1 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
CoordinateUtilsTrait
33.33% covered (danger)
33.33%
1 / 3
50.00% covered (danger)
50.00%
1 / 2
3.19
0.00% covered (danger)
0.00%
0 / 1
 coordinateUtils
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 setCoordinateUtils
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace Olz\Apps\Oev\Utils;
4
5use Olz\Utils\WithUtilsCache;
6use Symfony\Contracts\Service\Attribute\Required;
7
8trait CoordinateUtilsTrait {
9    protected function coordinateUtils(): CoordinateUtils {
10        $util = WithUtilsCache::get('coordinateUtils');
11        assert($util);
12        return $util;
13    }
14
15    #[Required]
16    public function setCoordinateUtils(CoordinateUtils $new): void {
17        WithUtilsCache::set('coordinateUtils', $new);
18    }
19}