Passed
Push — master ( 77644d...1d6156 )
by MusikAnimal
06:06
created
src/AppBundle/Repository/PageRepository.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the PageRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Repository;
9 9
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
         $time2 = time();
302 302
 
303 303
         // If it took over 5 seconds, cache the result for 20 minutes.
304
-        if ($time2 - $time1 > 5) {
304
+        if ($time2-$time1 > 5) {
305 305
             $this->setCache($cacheKey, $result, 'PT20M');
306 306
         }
307 307
 
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 
390 390
         $wikidataId = ltrim($page->getWikidataId(), 'Q');
391 391
 
392
-        $sql = "SELECT " . ($count ? 'COUNT(*) AS count' : '*') . "
392
+        $sql = "SELECT ".($count ? 'COUNT(*) AS count' : '*')."
393 393
                 FROM wikidatawiki_p.wb_items_per_site
394 394
                 WHERE ips_item_id = :wikidataId";
395 395
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
             'wikidataId' => $wikidataId,
398 398
         ])->fetchAll();
399 399
 
400
-        return $count ? (int) $result[0]['count'] : $result;
400
+        return $count ? (int)$result[0]['count'] : $result;
401 401
     }
402 402
 
403 403
     /**
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 
436 436
         // Transform to associative array by 'type'
437 437
         foreach ($res as $row) {
438
-            $data[$row['type'] . '_count'] = (int)$row['value'];
438
+            $data[$row['type'].'_count'] = (int)$row['value'];
439 439
         }
440 440
 
441 441
         return $data;
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 
478 478
         $project = $page->getProject()->getDomain();
479 479
 
480
-        $url = 'https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/' .
480
+        $url = 'https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/'.
481 481
             "$project/all-access/user/$title/daily/$start/$end";
482 482
 
483 483
         $res = $client->request('GET', $url);
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
             $normalized = [];
552 552
             if (isset($result['query']['normalized'])) {
553 553
                 array_map(
554
-                    function ($e) use (&$normalized): void {
554
+                    function($e) use (&$normalized): void {
555 555
                         $normalized[$e['to']] = $e['from'];
556 556
                     },
557 557
                     $result['query']['normalized']
Please login to merge, or discard this patch.
src/AppBundle/Repository/ArticleInfoRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the ArticleInfoRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Repository;
9 9
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
         $sql = "SELECT log_action, log_type, log_timestamp AS 'timestamp'
77 77
                 FROM $loggingTable
78
-                WHERE log_namespace = '" . $page->getNamespace() . "'
78
+                WHERE log_namespace = '".$page->getNamespace()."'
79 79
                 AND log_title = :title AND log_timestamp > 1 $datesConditions
80 80
                 AND log_type IN ('delete', 'move', 'protect', 'stable')";
81 81
         $title = str_replace(' ', '_', $page->getTitle());
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
         $projectLang = $page->getProject()->getLang();
104 104
 
105
-        $url = "https://api.wikiwho.net/$projectLang/api/v1.0.0-beta/rev_content/" .
105
+        $url = "https://api.wikiwho.net/$projectLang/api/v1.0.0-beta/rev_content/".
106 106
             "$title/?o_rev_id=false&editor=true&token_id=false&out=false&in=false";
107 107
 
108 108
         $res = $client->request('GET', $url, ['http_errors' => false]);
Please login to merge, or discard this patch.