| Conditions | 5 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 73 | protected function validateParams() |
||
| 74 | { |
||
| 75 | if (!$this->driver) { |
||
|
|
|||
| 76 | throw new \Exception("Driver not selected or default driver does not exist."); |
||
| 77 | } |
||
| 78 | if (empty($this->config['drivers'][$this->driver]) OR empty($this->config['map'][$this->driver])) { |
||
| 79 | throw new \Exception("Driver not found in config file. Try updating the package."); |
||
| 80 | } |
||
| 81 | |||
| 82 | if (!class_exists($this->config['map'][$this->driver])) { |
||
| 83 | throw new \Exception("Driver source not found. Please update the package."); |
||
| 84 | } |
||
| 85 | } |
||
| 86 | |||
| 88 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: