Total Complexity | 9 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
6 | class EnvFile |
||
7 | { |
||
8 | /** |
||
9 | * @var string |
||
10 | */ |
||
11 | private $filePath; |
||
12 | |||
13 | public function __construct(string $filePath) |
||
14 | { |
||
15 | |||
16 | $this->filePath = $filePath; |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * Adds or updates an environment variable. |
||
21 | */ |
||
22 | public function set(string $key, string $value, string $comment = null): void |
||
49 | } |
||
50 | } |
||
51 | |||
52 | private function has(string $envName): bool |
||
59 | } |
||
60 | |||
61 | private function getContent(): string |
||
70 |