Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
66.67% covered (warning)
66.67%
2 / 3
50.00% covered (danger)
50.00%
1 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
CoordinateUtilsTrait
66.67% covered (warning)
66.67%
2 / 3
50.00% covered (danger)
50.00%
1 / 2
2.15
0.00% covered (danger)
0.00%
0 / 1
 coordinateUtils
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 setCoordinateUtils
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
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}