| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | 3 | public static function autoload($class) |
|
| 44 | { |
||
| 45 | 3 | $prefixLength = strlen(self::NAMESPACE_PREFIX); |
|
| 46 | 3 | if (0 === strncmp(self::NAMESPACE_PREFIX, $class, $prefixLength)) { |
|
| 47 | 2 | $file = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, $prefixLength)); |
|
| 48 | 2 | $file = realpath(__DIR__ . (empty($file) ? '' : DIRECTORY_SEPARATOR) . $file . '.php'); |
|
| 49 | // @codeCoverageIgnoreStart |
||
| 50 | if (file_exists($file)) { |
||
| 51 | require_once $file; |
||
| 52 | } |
||
| 53 | // @codeCoverageIgnoreEnd |
||
| 54 | 2 | } |
|
| 55 | 3 | } |
|
| 56 | } |
||
| 57 |