Completed
Pull Request — master (#11)
by Adeniyi
02:20
created
src/Database/DBConfig.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             {
48 48
                 parent::__construct($this->mysqlConnectionString(), $this->user, $this->password);
49 49
             }
50
-            elseif($this->driver === 'sqlite')
50
+            elseif ($this->driver === 'sqlite')
51 51
             {
52 52
                 parent::__construct($this->sqlitConnectionString());
53 53
             }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     protected function pgsqlConnectionString()
65 65
     {
66
-        return $this->driver . ':host=' . $this->host . ';port=' . $this->port . ';dbname=' . $this->dbname . ';user=' . $this->user . ';password=' . $this->password;
66
+        return $this->driver.':host='.$this->host.';port='.$this->port.';dbname='.$this->dbname.';user='.$this->user.';password='.$this->password;
67 67
     }
68 68
 
69 69
     /**
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     protected function mysqlConnectionString()
75 75
     {
76
-        return $this->driver . ':host=' . $this->host . ';dbname=' . $this->dbname . ';charset=utf8mb4';
76
+        return $this->driver.':host='.$this->host.';dbname='.$this->dbname.';charset=utf8mb4';
77 77
     }
78 78
 
79 79
     /**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     protected function sqlitConnectionString()
85 85
     {
86
-        return $this->driver . ':' . $this->sqlitePath;
86
+        return $this->driver.':'.$this->sqlitePath;
87 87
     }
88 88
 
89 89
     /**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     protected function loadEnv()
93 93
     {
94
-        if( ! getenv("APP_ENV" !== "production"))
94
+        if ( ! getenv("APP_ENV" !== "production"))
95 95
         {
96 96
             $dotenv = new Dotenv($_SERVER['DOCUMENT_ROOT']);
97 97
             $dotenv->load();
Please login to merge, or discard this patch.
src/Helper/Model.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $sqlQuery = DatabaseQuery::selectAllQuery(self::getTableName($connection));
72 72
         $query = $connection->prepare($sqlQuery);
73 73
         $query->execute();
74
-        if ( $query->rowCount() )
74
+        if ($query->rowCount())
75 75
         {
76 76
             return new GetData($query->fetchAll($connection::FETCH_ASSOC));
77 77
         }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $sqlQuery = $databaseQuery->selectQuery(self::getTableName($connection), $data, $condition, $connection);
93 93
         $query = $connection->prepare($sqlQuery);
94 94
         $query->execute();
95
-        if ( $query->rowCount() )
95
+        if ($query->rowCount())
96 96
         {
97 97
             return new GetData($query->fetchAll($connection::FETCH_ASSOC));
98 98
         }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $sqlQuery = DatabaseQuery::selectQuery(self::getTableName($connection), ['id' => $value], NULL, $connection);
113 113
         $query = $connection->prepare($sqlQuery);
114 114
         $query->execute();
115
-        if ( $query->rowCount() )
115
+        if ($query->rowCount())
116 116
         {
117 117
             $found = new static;
118 118
             $found->id = $value;
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
         $updateQuery = $this->updateQuery(self::getTableName($connection));
157 157
         $statement = $connection->prepare($updateQuery);
158
-        if( $statement->execute() )
158
+        if ($statement->execute())
159 159
         {
160 160
             return true;
161 161
         }
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     {
173 173
         $connection = DatabaseQuery::checkConnection($dbConnection);
174 174
 
175
-        $query = $connection->prepare('DELETE FROM ' . self::getTableName($connection) . ' WHERE id = '.$value);
175
+        $query = $connection->prepare('DELETE FROM '.self::getTableName($connection).' WHERE id = '.$value);
176 176
         $query->execute();
177 177
         $check = $query->rowCount();
178 178
         if ($check)
Please login to merge, or discard this patch.