@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Opeyemiabiodun\PotatoORM\Connections; |
| 4 | 4 | |
| 5 | +use Opeyemiabiodun\PotatoORM\Connections\Connection; |
|
| 5 | 6 | use PDO; |
| 6 | 7 | use PDOException; |
| 7 | -use Opeyemiabiodun\PotatoORM\Connections\Connection; |
|
| 8 | 8 | |
| 9 | 9 | final class MySqlConnection extends Connection |
| 10 | 10 | { |
@@ -12,9 +12,9 @@ |
||
| 12 | 12 | { |
| 13 | 13 | $this->useDbEnv(); |
| 14 | 14 | |
| 15 | - $dsn = 'mysql:host='.$this->_host |
|
| 16 | - .';port='.$this->_port |
|
| 17 | - .';dbname='.$this->_database; |
|
| 15 | + $dsn = 'mysql:host=' . $this->_host |
|
| 16 | + .';port=' . $this->_port |
|
| 17 | + .';dbname=' . $this->_database; |
|
| 18 | 18 | |
| 19 | 19 | try { |
| 20 | 20 | $this->_pdo = new PDO($dsn, $this->_username, $this->_password); |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Opeyemiabiodun\PotatoORM\Connections; |
| 4 | 4 | |
| 5 | +use Opeyemiabiodun\PotatoORM\Connections\Connection; |
|
| 5 | 6 | use PDO; |
| 6 | 7 | use PDOException; |
| 7 | -use Opeyemiabiodun\PotatoORM\Connections\Connection; |
|
| 8 | 8 | |
| 9 | 9 | final class PgSqlConnection extends Connection |
| 10 | 10 | { |
@@ -12,11 +12,11 @@ |
||
| 12 | 12 | { |
| 13 | 13 | $this->useDbEnv(); |
| 14 | 14 | |
| 15 | - $dsn = 'pgsql:host='.$this->_host |
|
| 16 | - .';port='.$this->_port |
|
| 17 | - .';dbname='.$this->_database |
|
| 18 | - .';user='.$this->_username |
|
| 19 | - .';password='.$this->_password; |
|
| 15 | + $dsn = 'pgsql:host=' . $this->_host |
|
| 16 | + .';port=' . $this->_port |
|
| 17 | + .';dbname=' . $this->_database |
|
| 18 | + .';user=' . $this->_username |
|
| 19 | + .';password=' . $this->_password; |
|
| 20 | 20 | |
| 21 | 21 | try { |
| 22 | 22 | $this->_pdo = new PDO($dsn); |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | protected function loadDbEnv() |
| 36 | 36 | { |
| 37 | - $dotenv = new Dotenv(__DIR__.'/..'); |
|
| 37 | + $dotenv = new Dotenv(__DIR__ . '/..'); |
|
| 38 | 38 | $dotenv->required(['DB_HOST', 'DB_DATABASE', 'DB_USERNAME', 'DB_PASSWORD', 'DB_PORT'])->notEmpty(); |
| 39 | 39 | $dotenv->load(); |
| 40 | 40 | |