Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | 1 | protected static function resolveCallback(string $value, callable $callback) |
|
35 | { |
||
36 | 1 | $class = static::getSameClass(); |
|
37 | |||
38 | 1 | if (isset(static::$resolved[$class][$value])) { |
|
39 | 1 | return static::$resolved[$class][$value]; |
|
40 | } |
||
41 | |||
42 | 1 | return static::$resolved[$class][$value] = $callback($value); |
|
43 | } |
||
50 |