@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | { |
43 | 43 | $this->app = $app; |
44 | 44 | |
45 | - if (! $this->isConnected()) { |
|
45 | + if (!$this->isConnected()) { |
|
46 | 46 | $this->connect(); |
47 | 47 | } |
48 | 48 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | extract($data); |
60 | 60 | |
61 | 61 | try { |
62 | - self::$connection = new PDO('mysql:host=' . $server . ';dbname=' . $dbname, $dbuser, $dbpass); |
|
62 | + self::$connection = new PDO('mysql:host=' . $server . ';dbname=' . $dbname, $dbuser, $dbpass); |
|
63 | 63 | |
64 | 64 | self::$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
65 | 65 | |
@@ -94,9 +94,9 @@ discard block |
||
94 | 94 | |
95 | 95 | public function join($join, $localId = null, $forginId = null) |
96 | 96 | { |
97 | - if (! $localId) $localId = trim($join, 's' ). '_id'; |
|
97 | + if (!$localId) $localId = trim($join, 's') . '_id'; |
|
98 | 98 | |
99 | - if (! $forginId) $forginId = 'id'; |
|
99 | + if (!$forginId) $forginId = 'id'; |
|
100 | 100 | |
101 | 101 | $sql = $join . ' ON ' . $this->table . '.' . $localId . ' = ' . $join . '.' . $forginId; |
102 | 102 | |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | |
219 | 219 | if (!empty($this->orderBy)) { |
220 | 220 | |
221 | - $sql .= ' ORDER BY ' . implode (' ', $this->orderBy); |
|
221 | + $sql .= ' ORDER BY ' . implode(' ', $this->orderBy); |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | if ($this->limit) { |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | } |
233 | 233 | |
234 | 234 | if (!empty($this->groupBy)) { |
235 | - $sql .= ' GROUP BY ' . implode(' ' , $this->groupBy); |
|
235 | + $sql .= ' GROUP BY ' . implode(' ', $this->groupBy); |
|
236 | 236 | } |
237 | 237 | |
238 | 238 | return $sql; |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | { |
325 | 325 | $sql = ''; |
326 | 326 | |
327 | - foreach($this->data as $key => $value) { |
|
327 | + foreach ($this->data as $key => $value) { |
|
328 | 328 | |
329 | 329 | $sql .= '`' . $key . '` = ? ,'; |
330 | 330 | } |