Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
30 | 7 | public function __construct(PDO $resource) |
|
31 | { |
||
32 | 7 | $this->checkEnvironment(); |
|
33 | 7 | if ($resource->getAttribute(\PDO::ATTR_DRIVER_NAME) != 'sqlite') { |
|
34 | 1 | $msg = __CLASS__ . " requires pdo connection to be 'sqlite'"; |
|
35 | 1 | throw new Exception\InvalidArgumentException($msg); |
|
36 | } |
||
37 | 7 | $this->resource = $resource; |
|
38 | 7 | $this->connection = new PdoSqliteConnection($this, $resource); |
|
39 | 7 | } |
|
40 | |||
51 |