Conditions | 3 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
19 | public static function getProjectRootDirectory(): string |
||
20 | { |
||
21 | try { |
||
22 | if (null === self::$projectRootDirectory) { |
||
23 | $reflection = new \ReflectionClass(ClassLoader::class); |
||
24 | self::$projectRootDirectory = \dirname($reflection->getFileName(), 3); |
||
25 | } |
||
26 | |||
27 | return self::$projectRootDirectory; |
||
28 | } catch (\Exception $e) { |
||
29 | throw new \Exception( |
||
30 | 'Exception in '.__METHOD__.': '.$e->getMessage(), |
||
31 | $e->getCode(), |
||
32 | $e |
||
33 | ); |
||
55 |