Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public static function __callStatic($name, $arguments) |
||
14 | { |
||
15 | $dbCredentials = require('database.php'); |
||
16 | $var = $arguments[0]; |
||
17 | |||
18 | if(array_key_exists($var, $dbCredentials)){ |
||
19 | return $dbCredentials[$var]; |
||
20 | } |
||
21 | |||
22 | throw new \Exception("The requested key $var not found!", 1); |
||
23 | } |
||
25 |