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