@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function tableName() |
48 | 48 | { |
49 | - if(isset($this->table)) { |
|
49 | + if (isset($this->table)) { |
|
50 | 50 | return $this->table; |
51 | 51 | } |
52 | 52 | return null; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $sqlQuery = DatabaseQuery::selectAllQuery(self::getTableName($connection), self::fields()); |
106 | 106 | $query = $connection->prepare($sqlQuery); |
107 | 107 | $query->execute(); |
108 | - if ( $query->rowCount() ) |
|
108 | + if ($query->rowCount()) |
|
109 | 109 | { |
110 | 110 | return new GetData($query->fetchAll($connection::FETCH_ASSOC)); |
111 | 111 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $sqlQuery = $databaseQuery->selectQuery(self::getTableName($connection), $data, $condition, $connection); |
127 | 127 | $query = $connection->prepare($sqlQuery); |
128 | 128 | $query->execute(); |
129 | - if ( $query->rowCount() ) |
|
129 | + if ($query->rowCount()) |
|
130 | 130 | { |
131 | 131 | return new GetData($query->fetchAll($connection::FETCH_ASSOC)); |
132 | 132 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $sqlQuery = DatabaseQuery::selectQuery(self::getTableName($connection), ['id' => $value], NULL, $connection); |
147 | 147 | $query = $connection->prepare($sqlQuery); |
148 | 148 | $query->execute(); |
149 | - if ( $query->rowCount() ) |
|
149 | + if ($query->rowCount()) |
|
150 | 150 | { |
151 | 151 | $found = new static; |
152 | 152 | $found->id = $value; |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | |
169 | 169 | $query = $this->insertQuery(self::getTableName($connection)); |
170 | 170 | $statement = $connection->prepare($query); |
171 | - if( $statement->execute() ) |
|
171 | + if ($statement->execute()) |
|
172 | 172 | { |
173 | 173 | return true; |
174 | 174 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | |
189 | 189 | $updateQuery = $this->updateQuery(self::getTableName($connection)); |
190 | 190 | $statement = $connection->prepare($updateQuery); |
191 | - if( $statement->execute() ) |
|
191 | + if ($statement->execute()) |
|
192 | 192 | { |
193 | 193 | return true; |
194 | 194 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | { |
206 | 206 | $connection = DatabaseQuery::checkConnection($dbConnection); |
207 | 207 | |
208 | - $query = $connection->prepare('DELETE FROM ' . self::getTableName($connection) . ' WHERE id = '.$value); |
|
208 | + $query = $connection->prepare('DELETE FROM '.self::getTableName($connection).' WHERE id = '.$value); |
|
209 | 209 | $query->execute(); |
210 | 210 | $check = $query->rowCount(); |
211 | 211 | if ($check) |
@@ -62,7 +62,7 @@ |
||
62 | 62 | */ |
63 | 63 | public function first() |
64 | 64 | { |
65 | - return json_decode( $this->toJson() ); |
|
65 | + return json_decode($this->toJson()); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |