| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 67 | private function regsterLoader() |
||
| 68 | { |
||
| 69 | if (\in_array($this->classDir, static::$classDirs, true)) { |
||
|
|
|||
| 70 | return; |
||
| 71 | } |
||
| 72 | static::$classDirs[] = $this->classDir; |
||
| 73 | spl_autoload_register( |
||
| 74 | function (string $class) { |
||
| 75 | $file = sprintf('%s/%s.php', $this->classDir, str_replace('\\', '_', $class)); |
||
| 76 | if (file_exists($file)) { |
||
| 77 | include $file; //@codeCoverageIgnore |
||
| 78 | } |
||
| 79 | } |
||
| 80 | ); |
||
| 81 | } |
||
| 82 | } |
||
| 83 |
Late static binding only has effect in subclasses. A
finalclass cannot be extended anymore so late static binding cannot occurr. Consider replacingstatic::withself::.To learn more about late static binding, please refer to the PHP core documentation.