| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 4.125 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php namespace GameScan\Core\Tools; |
||
| 12 | 2 | public function __construct($path = null, $filename = ".env") |
|
| 13 | { |
||
| 14 | 2 | if ($path === null) { |
|
| 15 | $path = __DIR__ . '/../../../../..'; |
||
| 16 | } |
||
| 17 | |||
| 18 | 2 | if (!file_exists($path . DIRECTORY_SEPARATOR . $filename)) { |
|
| 19 | 2 | throw new EnvironmentException($path . DIRECTORY_SEPARATOR . $filename . " is not exist. Please create an environment file before using this feature"); |
|
| 20 | } |
||
| 21 | |||
| 22 | $this->path = $path; |
||
| 23 | } |
||
| 24 | |||
| 41 |