| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public static function getHomeConfigDir() |
||
| 23 | { |
||
| 24 | if (static::$homeConfigDir) { |
||
| 25 | return static::$homeConfigDir; |
||
| 26 | } |
||
| 27 | if (static::isWindows()) { |
||
| 28 | // @codeCoverageIgnoreStart |
||
| 29 | if (!getenv('APPDATA')) { |
||
| 30 | throw new \RuntimeException('The APPDATA environment variable must be set for crm to run correctly'); |
||
| 31 | } |
||
| 32 | $homeConfigDir = rtrim(strtr(getenv('APPDATA'), '\\', '/'), '/') . '/ComposerRegistryManager'; |
||
| 33 | //codeCoverageIgnoreEnd |
||
| 34 | } else { |
||
| 35 | $homeConfigDir = (new Xdg())->getHomeConfigDir() . '/composer-registry-manager'; |
||
| 36 | } |
||
| 37 | return static::$homeConfigDir = $homeConfigDir; |
||
| 38 | } |
||
| 39 | |||
| 67 |