Skip to content

Commit

Permalink
Remove duplicate of code (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdef committed Dec 11, 2022
1 parent 75db32d commit 21ec874
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/ConnectionPDO.php
Expand Up @@ -89,24 +89,4 @@ public function getSchema(): SchemaInterface

return $this->schema;
}

/**
* Initializes the DB connection.
*
* This method is invoked right after the DB connection is established.
*
* The default implementation turns on `PDO::ATTR_EMULATE_PREPARES`.
*
* if {@see emulatePrepare} is true, and sets the database {@see charset} if it is not empty.
*
* It then triggers an {@see EVENT_AFTER_OPEN} event.
*/
protected function initConnection(): void
{
if ($this->getEmulatePrepare() !== null) {
$this->driver->attributes([PDO::ATTR_EMULATE_PREPARES => $this->getEmulatePrepare()]);
}

$this->pdo = $this->driver->createConnection();
}
}

0 comments on commit 21ec874

Please sign in to comment.