| Conditions | 6 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 42 |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | function autoload($className) |
||
| 11 | { |
||
| 12 | if (strpos($className, 's9e\\TextFormatter\\') === 0 |
||
| 13 | && strpos($className, '.') === false) |
||
| 14 | { |
||
| 15 | $path = __DIR__ . strtr(substr($className, 17), '\\', '/') . '.php'; |
||
| 16 | |||
| 17 | if (file_exists($path)) |
||
| 18 | { |
||
| 19 | include $path; |
||
| 20 | } |
||
| 21 | elseif (!class_exists('s9e\\TextFormatter\\Configurator', false) |
||
| 22 | && strpos($className, 's9e\\TextFormatter\\Configurator\\') === 0) |
||
| 23 | { |
||
| 24 | include __DIR__ . '/Configurator.php'; |
||
| 25 | } |
||
| 26 | } |
||
| 27 | } |
||
| 28 | |||
| 29 | spl_autoload_register('s9e\\TextFormatter\\autoload'); |