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