Completed
Push — work-fleets ( 961997...006942 )
by SuperNova.WS
06:22
created
classes/DBAL/DbQuery.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
     $this->buildCommand(static::SELECT);
108 108
     $this->build[] = ' *';
109
-    $this->build[] = " FROM " . $this->quoteTable($this->table);
109
+    $this->build[] = " FROM ".$this->quoteTable($this->table);
110 110
     $this->buildWhere();
111 111
     $this->buildLimit();
112 112
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
    * @return string
141 141
    */
142 142
   protected function setInsertCommand($replace) {
143
-    switch($replace) {
143
+    switch ($replace) {
144 144
       case DB_INSERT_IGNORE:
145 145
         $result = static::INSERT_IGNORE;
146 146
       break;
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
    * @return string
311 311
    */
312 312
   protected function stringValue($value) {
313
-    return "'" . $this->escape((string)$value) . "'";
313
+    return "'".$this->escape((string) $value)."'";
314 314
   }
315 315
 
316 316
   /**
@@ -321,20 +321,20 @@  discard block
 block discarded – undo
321 321
    * @return string
322 322
    */
323 323
   public function quote($fieldName) {
324
-    return "`" . $this->escape((string)$fieldName) . "`";
324
+    return "`".$this->escape((string) $fieldName)."`";
325 325
   }
326 326
 
327 327
   public function makeAdjustString($fieldValue, $fieldName) {
328 328
     return is_int($fieldName)
329 329
       ? $fieldValue
330
-      : (($fieldNameQuoted = $this->quote($fieldName)) . " = " .
331
-        $fieldNameQuoted . " + (" . $this->castAsDbValue($fieldValue) . ")");
330
+      : (($fieldNameQuoted = $this->quote($fieldName))." = ".
331
+        $fieldNameQuoted." + (".$this->castAsDbValue($fieldValue).")");
332 332
   }
333 333
 
334 334
   public function makeFieldEqualValue($fieldValue, $fieldName) {
335 335
     return is_int($fieldName)
336 336
       ? $fieldValue
337
-      : ($this->quote($fieldName) . " = " . $this->castAsDbValue($fieldValue));
337
+      : ($this->quote($fieldName)." = ".$this->castAsDbValue($fieldValue));
338 338
   }
339 339
 
340 340
   /**
@@ -345,11 +345,11 @@  discard block
 block discarded – undo
345 345
    * @return string
346 346
    */
347 347
   protected function quoteTable($tableName) {
348
-    return "`{{" . $this->escape((string)$tableName) . "}}`";
348
+    return "`{{".$this->escape((string) $tableName)."}}`";
349 349
   }
350 350
 
351 351
   public function castAsDbValue($value) {
352
-    switch(gettype($value)) {
352
+    switch (gettype($value)) {
353 353
       case TYPE_INTEGER:
354 354
       case TYPE_DOUBLE:
355 355
         // do nothing
@@ -380,19 +380,19 @@  discard block
 block discarded – undo
380 380
 
381 381
 
382 382
   protected function buildCommand($command) {
383
-    switch($this->command = $command) {
383
+    switch ($this->command = $command) {
384 384
       case static::UPDATE:
385
-        $this->build[] = $this->command . " " . $this->quoteTable($this->table);
385
+        $this->build[] = $this->command." ".$this->quoteTable($this->table);
386 386
       break;
387 387
 
388 388
       case static::DELETE:
389
-        $this->build[] = $this->command . " FROM " . $this->quoteTable($this->table);
389
+        $this->build[] = $this->command." FROM ".$this->quoteTable($this->table);
390 390
       break;
391 391
 
392 392
       case static::REPLACE:
393 393
       case static::INSERT_IGNORE:
394 394
       case static::INSERT:
395
-        $this->build[] = $this->command . " INTO " . $this->quoteTable($this->table);
395
+        $this->build[] = $this->command." INTO ".$this->quoteTable($this->table);
396 396
       break;
397 397
 
398 398
       case static::SELECT:
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
     }
443 443
 
444 444
     foreach ($this->values as $valuesVector) {
445
-      $compiled[] = '(' . implode(',', HelperArray::map($valuesVector, array($this, 'castAsDbValue'))) . ')';
445
+      $compiled[] = '('.implode(',', HelperArray::map($valuesVector, array($this, 'castAsDbValue'))).')';
446 446
     }
447 447
 
448 448
     $this->build[] = implode(',', $compiled);
Please login to merge, or discard this patch.