Completed
Push — master ( 72638c...32ae8f )
by Ingo
11s
created
code/SQLite3Database.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@
 block discarded – undo
269 269
         $htmlEntityKeywords = htmlentities(utf8_decode($keywords));
270 270
 
271 271
         $pageClass = 'SilverStripe\\CMS\\Model\\SiteTree';
272
-		$fileClass = 'File';
272
+        $fileClass = 'File';
273 273
 
274 274
         $extraFilters = array($pageClass => '', $fileClass => '');
275 275
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
         // Ensure database name is set
112 112
         if (empty($parameters['database'])) {
113
-            $parameters['database'] = 'database' . self::database_extension();
113
+            $parameters['database'] = 'database'.self::database_extension();
114 114
         }
115 115
         $dbName = $parameters['database'];
116 116
         if (!self::is_valid_database_name($dbName)) {
@@ -126,11 +126,11 @@  discard block
 block discarded – undo
126 126
         } else {
127 127
             // Ensure path is given
128 128
             if (empty($parameters['path'])) {
129
-                $parameters['path'] = ASSETS_PATH . '/.sqlitedb';
129
+                $parameters['path'] = ASSETS_PATH.'/.sqlitedb';
130 130
             }
131 131
 
132 132
             //assumes that the path to dbname will always be provided:
133
-            $file = $parameters['path'] . '/' . $dbName;
133
+            $file = $parameters['path'].'/'.$dbName;
134 134
             if (!file_exists($parameters['path'])) {
135 135
                 SQLiteDatabaseConfigurationHelper::create_db_dir($parameters['path']);
136 136
                 SQLiteDatabaseConfigurationHelper::secure_db_dir($parameters['path']);
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
             $extraFilters[$fileClass] .= " AND ShowInSearch <> 0";
292 292
         }
293 293
 
294
-        $limit = $start . ", " . (int) $pageLength;
294
+        $limit = $start.", ".(int) $pageLength;
295 295
 
296 296
         $notMatch = $invertedMatch ? "NOT " : "";
297 297
         if ($keywords) {
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
         $queries = array();
317 317
         foreach ($classesToSearch as $class) {
318 318
             $queries[$class] = DataList::create($class)
319
-                ->where($notMatch . $match[$class] . $extraFilters[$class])
319
+                ->where($notMatch.$match[$class].$extraFilters[$class])
320 320
                 ->dataQuery()
321 321
                 ->query();
322 322
         }
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
                 "\"Created\"",
335 335
                 "NULL AS \"Name\"",
336 336
                 "\"CanViewType\"",
337
-                $relevance[$pageClass] . " AS Relevance"
337
+                $relevance[$pageClass]." AS Relevance"
338 338
             ),
339 339
             $fileClass => array(
340 340
                 "\"ClassName\"",
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
                 "\"Created\"",
348 348
                 "\"Name\"",
349 349
                 "NULL AS \"CanViewType\"",
350
-                $relevance[$fileClass] . " AS Relevance"
350
+                $relevance[$fileClass]." AS Relevance"
351 351
             )
352 352
         );
353 353
 
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
             $totalCount += $query->unlimitedRowCount();
379 379
         }
380 380
 
381
-        $fullQuery = implode(" UNION ", $querySQLs) . " ORDER BY $sortBy LIMIT $limit";
381
+        $fullQuery = implode(" UNION ", $querySQLs)." ORDER BY $sortBy LIMIT $limit";
382 382
         // Get records
383 383
         $records = $this->preparedQuery($fullQuery, $queryParameters);
384 384
 
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
                 $comp = 'LIKE';
466 466
             }
467 467
             if ($negate) {
468
-                $comp = 'NOT ' . $comp;
468
+                $comp = 'NOT '.$comp;
469 469
             }
470 470
         }
471 471
 
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
         preg_match_all('/%(.)/', $format, $matches);
482 482
         foreach ($matches[1] as $match) {
483 483
             if (array_search($match, array('Y', 'm', 'd', 'H', 'i', 's', 'U')) === false) {
484
-                user_error('formattedDatetimeClause(): unsupported format character %' . $match, E_USER_WARNING);
484
+                user_error('formattedDatetimeClause(): unsupported format character %'.$match, E_USER_WARNING);
485 485
             }
486 486
         }
487 487
 
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
             $date = "'$date'";
507 507
         }
508 508
 
509
-        $modifier = empty($modifiers) ? '' : ", '" . implode("', '", $modifiers) . "'";
509
+        $modifier = empty($modifiers) ? '' : ", '".implode("', '", $modifiers)."'";
510 510
         return "strftime('$format', $date$modifier)";
511 511
     }
512 512
 
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
             $date = "'$date'";
524 524
         }
525 525
 
526
-        $modifier = empty($modifiers) ? '' : ", '" . implode("', '", $modifiers) . "'";
526
+        $modifier = empty($modifiers) ? '' : ", '".implode("', '", $modifiers)."'";
527 527
         return "datetime($date$modifier, '$interval')";
528 528
     }
529 529
 
@@ -551,8 +551,8 @@  discard block
 block discarded – undo
551 551
             $date2 = "'$date2'";
552 552
         }
553 553
 
554
-        $modifier1 = empty($modifiers1) ? '' : ", '" . implode("', '", $modifiers1) . "'";
555
-        $modifier2 = empty($modifiers2) ? '' : ", '" . implode("', '", $modifiers2) . "'";
554
+        $modifier1 = empty($modifiers1) ? '' : ", '".implode("', '", $modifiers1)."'";
555
+        $modifier2 = empty($modifiers2) ? '' : ", '".implode("', '", $modifiers2)."'";
556 556
 
557 557
         return "strftime('%s', $date1$modifier1) - strftime('%s', $date2$modifier2)";
558 558
     }
Please login to merge, or discard this patch.