Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
34 | 7 | protected function applyCurrent(CharTree $charTree): CharTree |
|
35 | { |
||
36 | // When PHP 7.1 is no longer supported, change to using spl_object_id. |
||
37 | 7 | $hash = spl_object_hash($charTree); |
|
38 | |||
39 | 7 | if (!isset(self::$memoization[$hash])) { |
|
40 | 7 | self::$memoization[$hash] = $this->mixedCaseCoder->apply($charTree); |
|
41 | } |
||
42 | |||
43 | 7 | return self::$memoization[$hash]; |
|
44 | } |
||
46 |