| Conditions | 4 |
| Paths | 3 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | public function __construct ($filePath) |
||
| 9 | { |
||
| 10 | if (file_exists($filePath)) |
||
| 11 | { |
||
| 12 | $file = file_get_contents($filePath, true); |
||
| 13 | $json = json_decode($file, true); |
||
| 14 | |||
| 15 | $this->username = $json['username']; |
||
| 16 | $this->password = $json['password']; |
||
| 17 | } |
||
| 18 | else if (getenv('username') !== false && getenv('password') !== false) |
||
| 19 | { |
||
| 20 | $this->username = getenv('username'); |
||
| 21 | $this->password = getenv('password'); |
||
| 22 | } |
||
| 23 | } |
||
| 24 | |||
| 40 |