| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 4 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 28 | 6 | protected function applyCurrent(CharTree $charTree): CharTree |
|
| 29 | { |
||
| 30 | // When PHP 7.1 is no longer supported, change to using spl_object_id. |
||
| 31 | 6 | $hash = spl_object_hash($charTree); |
|
| 32 | |||
| 33 | 6 | if (!isset(self::$memoization[$hash])) { |
|
| 34 | 6 | self::$memoization[$hash] = $this->format($charTree); |
|
| 35 | } |
||
| 36 | |||
| 37 | 6 | return self::$memoization[$hash]; |
|
| 38 | } |
||
| 40 |