@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * @license MIT |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | /** |
| 3 | 3 | * @license MIT |
| 4 | 4 | * @author Samuel Adeshina <[email protected]> |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | /** |
| 3 | 3 | * @license MIT |
| 4 | 4 | * @author Samuel Adeshina <[email protected]> |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | public $connection; |
| 22 | 22 | |
| 23 | - public function __construct(string $adapter, array $dsnArray, string $username=null, string $password=null) |
|
| 23 | + public function __construct(string $adapter, array $dsnArray, string $username = null, string $password = null) |
|
| 24 | 24 | { |
| 25 | 25 | $class = __NAMESPACE__."\\Adapters\\$adapter"; |
| 26 | 26 | $adapterObject = new $class; |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | * @throws \EmmetBlue\Core\Exception\SQLException |
| 61 | 61 | * @return void |
| 62 | 62 | */ |
| 63 | - public function connect(string $username="", string $password="") |
|
| 63 | + public function connect(string $username = "", string $password = "") |
|
| 64 | 64 | { |
| 65 | 65 | $dbLocation = $this->dsn[0]; |
| 66 | 66 | |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | * @throws \EmmetBlue\Core\Exception\SQLException |
| 56 | 56 | * @return void |
| 57 | 57 | */ |
| 58 | - public function connect(string $username, string $password="") |
|
| 58 | + public function connect(string $username, string $password = "") |
|
| 59 | 59 | { |
| 60 | 60 | $host = $this->dsn[0]; |
| 61 | 61 | $database = $this->dsn[1]; |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | * @throws \EmmetBlue\Core\Exception\SQLException |
| 61 | 61 | * @return void |
| 62 | 62 | */ |
| 63 | - public function connect(string $username, string $password="") |
|
| 63 | + public function connect(string $username, string $password = "") |
|
| 64 | 64 | { |
| 65 | 65 | $server = $this->dsn[0]; |
| 66 | 66 | $database = $this->dsn[1]; |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | * @throws [@todo get exceptions] |
| 35 | 35 | * @return void |
| 36 | 36 | */ |
| 37 | - public function connect(string $username, string $password=""); |
|
| 37 | + public function connect(string $username, string $password = ""); |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * Returns an instance a pdo intance of the connection object |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | /** |
| 3 | 3 | * @license MIT |
| 4 | 4 | * @author Samuel Adeshina <[email protected]> |
@@ -52,10 +52,10 @@ discard block |
||
| 52 | 52 | const UNDEFINED = 0; |
| 53 | 53 | |
| 54 | 54 | public static function getGlobals($config = "configs") { |
| 55 | - if (is_file("globals.json")){ |
|
| 55 | + if (is_file("globals.json")) { |
|
| 56 | 56 | $globalLoc = json_decode(file_get_contents("globals.json"), true); |
| 57 | 57 | |
| 58 | - if (isset($globalLoc["globals"])){ |
|
| 58 | + if (isset($globalLoc["globals"])) { |
|
| 59 | 59 | $file = $globalLoc["globals"].".json"; |
| 60 | 60 | |
| 61 | 61 | return json_decode(file_get_contents($file), true); |