Passed
Pull Request — master (#118)
by MusikAnimal
03:38
created
src/Xtools/UserRepository.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -262,8 +262,8 @@  discard block
 block discarded – undo
262 262
                 FROM $pageTable
263 263
                 JOIN $revisionTable ON page_id = rev_page
264 264
                 $paJoin
265
-                WHERE $whereRev AND rev_parent_id = '0' $namespaceConditionRev $redirectCondition" .
266
-                ($hasPageAssessments ? 'GROUP BY rev_page' : '') . "
265
+                WHERE $whereRev AND rev_parent_id = '0' $namespaceConditionRev $redirectCondition".
266
+                ($hasPageAssessments ? 'GROUP BY rev_page' : '')."
267 267
             )
268 268
 
269 269
             UNION
@@ -382,14 +382,14 @@  discard block
 block discarded – undo
382 382
         $condEnd = '';
383 383
 
384 384
         if (!empty($start)) {
385
-            $cacheKey .= '.' . $start;
385
+            $cacheKey .= '.'.$start;
386 386
 
387 387
             // For the query
388 388
             $start = date('Ymd000000', strtotime($start));
389 389
             $condBegin = 'AND rev_timestamp >= :start ';
390 390
         }
391 391
         if (!empty($end)) {
392
-            $cacheKey .= '.' . $end;
392
+            $cacheKey .= '.'.$end;
393 393
 
394 394
             // For the query
395 395
             $end = date('Ymd235959', strtotime($end));
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
             $tagJoin = $tags != '' ? "LEFT OUTER JOIN $tagTable ON ct_rev_id = rev_id" : '';
419 419
             $condTools[] = "ct_tag IN ($tags)";
420 420
         }
421
-        $condTool = 'AND (' . implode(' OR ', $condTools) . ')';
421
+        $condTool = 'AND ('.implode(' OR ', $condTools).')';
422 422
 
423 423
         $sql = "SELECT COUNT(DISTINCT(rev_id))
424 424
                 FROM $revisionTable
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
             $resultQuery->bindParam('namespace', $namespace);
444 444
         }
445 445
         $resultQuery->execute();
446
-        $result = (int) $resultQuery->fetchColumn();
446
+        $result = (int)$resultQuery->fetchColumn();
447 447
 
448 448
         // Cache for 10 minutes, and return.
449 449
         $cacheItem = $this->cache->getItem($cacheKey)
@@ -631,13 +631,13 @@  discard block
 block discarded – undo
631 631
                 if ($condTool === '') {
632 632
                     $condTool = "ct_tag = $tag";
633 633
                 } else {
634
-                    $condTool = '(' . $condTool . " OR ct_tag = $tag)";
634
+                    $condTool = '('.$condTool." OR ct_tag = $tag)";
635 635
                 }
636 636
             }
637 637
 
638 638
             // Developer error, no regex or tag provided for this tool.
639 639
             if ($condTool === '') {
640
-                throw new Exception("No regex or tag found for the tool $toolname. " .
640
+                throw new Exception("No regex or tag found for the tool $toolname. ".
641 641
                     "Please verify this entry in semi_automated.yml");
642 642
             }
643 643
 
@@ -689,8 +689,8 @@  discard block
 block discarded – undo
689 689
         }
690 690
 
691 691
         // Sort the array by count
692
-        uasort($results, function ($a, $b) {
693
-            return $b['count'] - $a['count'];
692
+        uasort($results, function($a, $b) {
693
+            return $b['count']-$a['count'];
694 694
         });
695 695
 
696 696
         // Cache for 10 minutes, and return.
Please login to merge, or discard this patch.