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