Completed
Pull Request — master (#23)
by Damian
08:37
created
code/SQLite3Database.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
         // Ensure database name is set
109 109
         if (empty($parameters['database'])) {
110
-            $parameters['database'] = 'database' . self::database_extension();
110
+            $parameters['database'] = 'database'.self::database_extension();
111 111
         }
112 112
         $dbName = $parameters['database'];
113 113
         if (!self::is_valid_database_name($dbName)) {
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
         } else {
124 124
             // Ensure path is given
125 125
             if (empty($parameters['path'])) {
126
-                $parameters['path'] = ASSETS_PATH . '/.sqlitedb';
126
+                $parameters['path'] = ASSETS_PATH.'/.sqlitedb';
127 127
             }
128 128
 
129 129
             //assumes that the path to dbname will always be provided:
130
-            $file = $parameters['path'] . '/' . $dbName;
130
+            $file = $parameters['path'].'/'.$dbName;
131 131
             if (!file_exists($parameters['path'])) {
132 132
                 SQLiteDatabaseConfigurationHelper::create_db_dir($parameters['path']);
133 133
                 SQLiteDatabaseConfigurationHelper::secure_db_dir($parameters['path']);
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
             $extraFilters['File'] .= " AND ShowInSearch <> 0";
287 287
         }
288 288
 
289
-        $limit = $start . ", " . (int) $pageLength;
289
+        $limit = $start.", ".(int) $pageLength;
290 290
 
291 291
         $notMatch = $invertedMatch ? "NOT " : "";
292 292
         if ($keywords) {
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
         $queries = array();
312 312
         foreach ($classesToSearch as $class) {
313 313
             $queries[$class] = DataList::create($class)
314
-                ->where($notMatch . $match[$class] . $extraFilters[$class])
314
+                ->where($notMatch.$match[$class].$extraFilters[$class])
315 315
                 ->dataQuery()
316 316
                 ->query();
317 317
             $fromArr = $queries[$class]->getFrom();
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
             $totalCount += $query->unlimitedRowCount();
377 377
         }
378 378
 
379
-        $fullQuery = implode(" UNION ", $querySQLs) . " ORDER BY $sortBy LIMIT $limit";
379
+        $fullQuery = implode(" UNION ", $querySQLs)." ORDER BY $sortBy LIMIT $limit";
380 380
         // Get records
381 381
         $records = $this->preparedQuery($fullQuery, $queryParameters);
382 382
 
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
                 $comp = 'LIKE';
464 464
             }
465 465
             if ($negate) {
466
-                $comp = 'NOT ' . $comp;
466
+                $comp = 'NOT '.$comp;
467 467
             }
468 468
         }
469 469
 
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
         preg_match_all('/%(.)/', $format, $matches);
480 480
         foreach ($matches[1] as $match) {
481 481
             if (array_search($match, array('Y', 'm', 'd', 'H', 'i', 's', 'U')) === false) {
482
-                user_error('formattedDatetimeClause(): unsupported format character %' . $match, E_USER_WARNING);
482
+                user_error('formattedDatetimeClause(): unsupported format character %'.$match, E_USER_WARNING);
483 483
             }
484 484
         }
485 485
 
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
             $date = "'$date'";
505 505
         }
506 506
 
507
-        $modifier = empty($modifiers) ? '' : ", '" . implode("', '", $modifiers) . "'";
507
+        $modifier = empty($modifiers) ? '' : ", '".implode("', '", $modifiers)."'";
508 508
         return "strftime('$format', $date$modifier)";
509 509
     }
510 510
 
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
             $date = "'$date'";
522 522
         }
523 523
 
524
-        $modifier = empty($modifiers) ? '' : ", '" . implode("', '", $modifiers) . "'";
524
+        $modifier = empty($modifiers) ? '' : ", '".implode("', '", $modifiers)."'";
525 525
         return "datetime($date$modifier, '$interval')";
526 526
     }
527 527
 
@@ -549,8 +549,8 @@  discard block
 block discarded – undo
549 549
             $date2 = "'$date2'";
550 550
         }
551 551
 
552
-        $modifier1 = empty($modifiers1) ? '' : ", '" . implode("', '", $modifiers1) . "'";
553
-        $modifier2 = empty($modifiers2) ? '' : ", '" . implode("', '", $modifiers2) . "'";
552
+        $modifier1 = empty($modifiers1) ? '' : ", '".implode("', '", $modifiers1)."'";
553
+        $modifier2 = empty($modifiers2) ? '' : ", '".implode("', '", $modifiers2)."'";
554 554
 
555 555
         return "strftime('%s', $date1$modifier1) - strftime('%s', $date2$modifier2)";
556 556
     }
Please login to merge, or discard this patch.