@@ -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]> |
@@ -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]> |
@@ -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]> |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | public static function insert(string $table, array $data) |
| 31 | 31 | { |
| 32 | - $insertBuilder = (new Builder("QueryBuilder","Insert"))->getBuilder(); |
|
| 32 | + $insertBuilder = (new Builder("QueryBuilder", "Insert"))->getBuilder(); |
|
| 33 | 33 | $columns = []; |
| 34 | 34 | $values = []; |
| 35 | 35 | |
@@ -40,10 +40,10 @@ discard block |
||
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $columns = "(".implode(", ", $columns).")"; |
| 43 | - $values = "(".implode(", ", $values).")"; |
|
| 43 | + $values = "(".implode(", ", $values).")"; |
|
| 44 | 44 | $insertBuilder->into($table.$columns); |
| 45 | 45 | |
| 46 | - $query = (string)$insertBuilder." VALUES ".$values; |
|
| 46 | + $query = (string) $insertBuilder." VALUES ".$values; |
|
| 47 | 47 | // die($query); |
| 48 | 48 | try |
| 49 | 49 | { |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | $connection = DBConnectionFactory::getConnection(); |
| 55 | 55 | |
| 56 | - $result = $connection->prepare((string)$query)->execute(); |
|
| 56 | + $result = $connection->prepare((string) $query)->execute(); |
|
| 57 | 57 | |
| 58 | 58 | DatabaseLog::log(Session::get('USER_ID'), Constant::EVENT_INSERT, $schemaName, $tableName, $query); |
| 59 | 59 | |
@@ -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]> |
@@ -28,9 +28,9 @@ discard block |
||
| 28 | 28 | $this->workingValue = $value; |
| 29 | 29 | $this->conditionValue = $conditionValue; |
| 30 | 30 | |
| 31 | - if (!empty($conditions)){ |
|
| 31 | + if (!empty($conditions)) { |
|
| 32 | 32 | foreach ($conditions as $value) { |
| 33 | - if (!in_array($value, $this->dirtFilterConditions)){ |
|
| 33 | + if (!in_array($value, $this->dirtFilterConditions)) { |
|
| 34 | 34 | throw new \Exception("Invalid Dirt Filter Condition Provided: ".$value); |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -44,8 +44,8 @@ discard block |
||
| 44 | 44 | public function isDirty() : bool |
| 45 | 45 | { |
| 46 | 46 | $explodedString = explode(" ", $this->workingValue); |
| 47 | - foreach ($explodedString as $string){ |
|
| 48 | - foreach ($this->workingConditions as $condition){ |
|
| 47 | + foreach ($explodedString as $string) { |
|
| 48 | + foreach ($this->workingConditions as $condition) { |
|
| 49 | 49 | $switchValue = false; |
| 50 | 50 | switch ($condition) { |
| 51 | 51 | case '=': |
@@ -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]> |
@@ -55,7 +55,7 @@ discard block |
||
| 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]; |
@@ -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 Chukwuma Nwali <[email protected]> |