Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
12 | 4 | final protected static function createNamedInstance(string $name, $value) |
|
13 | { |
||
14 | 4 | $class = self::findParentClassForConst($name); |
|
15 | |||
16 | 4 | $key = self::getConstKey($class, $name); |
|
17 | |||
18 | 4 | if (!array_key_exists($key, self::$instances)) { |
|
19 | 3 | self::$instances[$key] = parent::createNamedInstance($name, $value); |
|
20 | } |
||
21 | |||
22 | 4 | return self::$instances[$key]; |
|
|
|||
23 | } |
||
24 | |||
47 |