| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | protected function createPdoInstance(): \PDO |
||
| 29 | { |
||
| 30 | $instance = new \PDO($this->dsn, $this->username, $this->password, $this->options); |
||
| 31 | |||
| 32 | if ($this->emulatePrepare !== null) { |
||
| 33 | $instance->setAttribute(\PDO::ATTR_EMULATE_PREPARES, $this->emulatePrepare); |
||
| 34 | } |
||
| 35 | |||
| 36 | if ($this->charset) { |
||
| 37 | $this->pdo->exec('SET NAMES ' . $this->pdo->quote($this->charset)); |
||
|
|
|||
| 38 | } |
||
| 39 | |||
| 40 | return $instance; |
||
| 41 | } |
||
| 48 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.