| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 59 | private function load() : void |
||
| 60 | { |
||
| 61 | if(!empty(self::$names)) { |
||
| 62 | return; |
||
| 63 | } |
||
| 64 | |||
| 65 | $content = strtolower(FileHelper::readContents(self::$cacheFile)); |
||
| 66 | |||
| 67 | $names = ConvertHelper::explodeTrim("\n", $content); |
||
| 68 | |||
| 69 | // Store the names as keys in the array to allow |
||
| 70 | // faster lookups (to avoid using in_array). |
||
| 71 | foreach($names as $name) { |
||
| 72 | self::$names[$name] = ''; |
||
| 73 | } |
||
| 76 |