| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | protected function guessNamespace($path) |
||
| 46 | { |
||
| 47 | if (defined('APP_PATH')) { |
||
| 48 | $appPathArray = explode('/', APP_PATH); |
||
| 49 | |||
| 50 | $relativePath = array_diff(explode('/', $path), $appPathArray); |
||
| 51 | |||
| 52 | array_unshift($relativePath, array_pop($appPathArray)); |
||
| 53 | |||
| 54 | $relativePath = array_map('ucfirst', $relativePath); |
||
| 55 | |||
| 56 | return implode('\\', $relativePath); |
||
| 57 | } |
||
| 58 | } |
||
| 59 | |||
| 99 |