| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | protected static function findParentPath($path) { |
||
| 42 | $dir = __DIR__; |
||
| 43 | $previousDir = '.'; |
||
| 44 | while (!is_dir($dir . '/' . $path)) { |
||
| 45 | $dir = dirname($dir); |
||
| 46 | if ($previousDir === $dir) { |
||
| 47 | return false; |
||
| 48 | } |
||
| 49 | $previousDir = $dir; |
||
| 50 | } |
||
| 51 | |||
| 52 | return $dir . '/' . $path; |
||
| 53 | } |
||
| 54 | } |
||
| 56 | Bootstrap::init(); |