Completed
Pull Request — master (#107)
by Matthew
02:22
created
src/Xtools/PagesRepository.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      * Get metadata about a single page from the API.
20 20
      * @param Project $project The project to which the page belongs.
21 21
      * @param string $pageTitle Page title.
22
-     * @return string[] Array with some of the following keys: pageid, title, missing, displaytitle,
22
+     * @return string|null Array with some of the following keys: pageid, title, missing, displaytitle,
23 23
      * url.
24 24
      */
25 25
     public function getPageInfo(Project $project, $pageTitle)
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      * @param int $numRevisions Number of revisions, if known. This is used solely to determine the
136 136
      *   OFFSET if we are given a $limit (see below). If $limit is set and $numRevisions is not set,
137 137
      *   a separate query is ran to get the nuber of revisions.
138
-     * @return Doctrine\DBAL\Driver\PDOStatement
138
+     * @return \Doctrine\DBAL\Driver\Statement
139 139
      */
140 140
     public function getRevisionsStmt(Page $page, User $user = null, $limit = null, $numRevisions = null)
141 141
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         // supply as the OFFSET.
149 149
         $limitClause = '';
150 150
         if (intval($limit) > 0 && isset($numRevisions)) {
151
-            $offset = $numRevisions - $limit;
151
+            $offset = $numRevisions-$limit;
152 152
             $limitClause = "LIMIT $offset, $limit";
153 153
         }
154 154
 
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 
379 379
         $wikidataId = ltrim($page->getWikidataId(), 'Q');
380 380
 
381
-        $sql = "SELECT " . ($count ? 'COUNT(*) AS count' : '*') . "
381
+        $sql = "SELECT ".($count ? 'COUNT(*) AS count' : '*')."
382 382
                 FROM wikidatawiki_p.wb_items_per_site
383 383
                 WHERE ips_item_id = :wikidataId";
384 384
 
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 
389 389
         $result = $resultQuery->fetchAll();
390 390
 
391
-        return $count ? (int) $result[0]['count'] : $result;
391
+        return $count ? (int)$result[0]['count'] : $result;
392 392
     }
393 393
 
394 394
     /**
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 
429 429
         // Transform to associative array by 'type'
430 430
         foreach ($res as $row) {
431
-            $data[$row['type'] . '_count'] = $row['value'];
431
+            $data[$row['type'].'_count'] = $row['value'];
432 432
         }
433 433
 
434 434
         return $data;
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
 
467 467
         $project = $page->getProject()->getDomain();
468 468
 
469
-        $url = 'https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/' .
469
+        $url = 'https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/'.
470 470
             "$project/all-access/user/$title/daily/$start/$end";
471 471
 
472 472
         $res = $client->request('GET', $url);
Please login to merge, or discard this patch.
src/AppBundle/Controller/EditCounterController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@
 block discarded – undo
136 136
         $isSubRequest = $this->container->get('request_stack')->getParentRequest() !== null;
137 137
 
138 138
         return $this->render('editCounter/result.html.twig', [
139
-            'xtTitle' => $this->user->getUsername() . ' - ' . $this->project->getTitle(),
139
+            'xtTitle' => $this->user->getUsername().' - '.$this->project->getTitle(),
140 140
             'xtPage' => 'ec',
141 141
             'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..'),
142 142
             'is_sub_request' => $isSubRequest,
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -14,11 +14,8 @@
 block discarded – undo
14 14
 use Symfony\Component\HttpFoundation\JsonResponse;
15 15
 use Xtools\EditCounter;
16 16
 use Xtools\EditCounterRepository;
17
-use Xtools\Page;
18 17
 use Xtools\Project;
19
-use Xtools\ProjectRepository;
20 18
 use Xtools\User;
21
-use Xtools\UserRepository;
22 19
 
23 20
 /**
24 21
  * Class EditCounterController
Please login to merge, or discard this patch.
src/AppBundle/Twig/Extension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         }
58 58
 
59 59
         // Find the path, and complain if English doesn't exist.
60
-        $path = $this->container->getParameter('kernel.root_dir') . '/../i18n';
60
+        $path = $this->container->getParameter('kernel.root_dir').'/../i18n';
61 61
         if (!file_exists("$path/en.json")) {
62 62
             throw new Exception("Language directory doesn't exist: $path");
63 63
         }
Please login to merge, or discard this patch.
src/AppBundle/Twig/AppExtension.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -44,32 +44,32 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $options = ['is_safe' => ['html']];
46 46
         return [
47
-            new \Twig_SimpleFunction('request_time', [ $this, 'requestTime' ], $options),
48
-            new \Twig_SimpleFunction('memory_usage', [ $this, 'requestMemory' ], $options),
49
-            new \Twig_SimpleFunction('year', [ $this, 'generateYear' ], $options),
50
-            new \Twig_SimpleFunction('msgPrintExists', [ $this, 'intuitionMessagePrintExists' ], $options),
51
-            new \Twig_SimpleFunction('msgExists', [ $this, 'intuitionMessageExists' ], $options),
52
-            new \Twig_SimpleFunction('msg', [ $this, 'intuitionMessage' ], $options),
53
-            new \Twig_SimpleFunction('lang', [ $this, 'getLang' ], $options),
54
-            new \Twig_SimpleFunction('langName', [ $this, 'getLangName' ], $options),
55
-            new \Twig_SimpleFunction('allLangs', [ $this, 'getAllLangs' ]),
56
-            new \Twig_SimpleFunction('isRTL', [ $this, 'intuitionIsRTL' ]),
57
-            new \Twig_SimpleFunction('isRTLLang', [ $this, 'intuitionIsRTLLang' ]),
58
-            new \Twig_SimpleFunction('shortHash', [ $this, 'gitShortHash' ]),
59
-            new \Twig_SimpleFunction('hash', [ $this, 'gitHash' ]),
60
-            new \Twig_SimpleFunction('releaseDate', [ $this, 'gitDate' ]),
61
-            new \Twig_SimpleFunction('enabled', [ $this, 'tabEnabled' ]),
62
-            new \Twig_SimpleFunction('tools', [ $this, 'allTools' ]),
63
-            new \Twig_SimpleFunction('color', [ $this, 'getColorList' ]),
64
-            new \Twig_SimpleFunction('chartColor', [ $this, 'chartColor' ]),
65
-            new \Twig_SimpleFunction('isSingleWiki', [ $this, 'isSingleWiki' ]),
66
-            new \Twig_SimpleFunction('getReplagThreshold', [ $this, 'getReplagThreshold' ]),
67
-            new \Twig_SimpleFunction('loadStylesheetsFromCDN', [ $this, 'loadStylesheetsFromCDN' ]),
68
-            new \Twig_SimpleFunction('isWMFLabs', [ $this, 'isWMFLabs' ]),
69
-            new \Twig_SimpleFunction('replag', [ $this, 'replag' ]),
70
-            new \Twig_SimpleFunction('link', [ $this, 'link' ]),
71
-            new \Twig_SimpleFunction('quote', [ $this, 'quote' ]),
72
-            new \Twig_SimpleFunction('bugReportURL', [ $this, 'bugReportURL' ]),
47
+            new \Twig_SimpleFunction('request_time', [$this, 'requestTime'], $options),
48
+            new \Twig_SimpleFunction('memory_usage', [$this, 'requestMemory'], $options),
49
+            new \Twig_SimpleFunction('year', [$this, 'generateYear'], $options),
50
+            new \Twig_SimpleFunction('msgPrintExists', [$this, 'intuitionMessagePrintExists'], $options),
51
+            new \Twig_SimpleFunction('msgExists', [$this, 'intuitionMessageExists'], $options),
52
+            new \Twig_SimpleFunction('msg', [$this, 'intuitionMessage'], $options),
53
+            new \Twig_SimpleFunction('lang', [$this, 'getLang'], $options),
54
+            new \Twig_SimpleFunction('langName', [$this, 'getLangName'], $options),
55
+            new \Twig_SimpleFunction('allLangs', [$this, 'getAllLangs']),
56
+            new \Twig_SimpleFunction('isRTL', [$this, 'intuitionIsRTL']),
57
+            new \Twig_SimpleFunction('isRTLLang', [$this, 'intuitionIsRTLLang']),
58
+            new \Twig_SimpleFunction('shortHash', [$this, 'gitShortHash']),
59
+            new \Twig_SimpleFunction('hash', [$this, 'gitHash']),
60
+            new \Twig_SimpleFunction('releaseDate', [$this, 'gitDate']),
61
+            new \Twig_SimpleFunction('enabled', [$this, 'tabEnabled']),
62
+            new \Twig_SimpleFunction('tools', [$this, 'allTools']),
63
+            new \Twig_SimpleFunction('color', [$this, 'getColorList']),
64
+            new \Twig_SimpleFunction('chartColor', [$this, 'chartColor']),
65
+            new \Twig_SimpleFunction('isSingleWiki', [$this, 'isSingleWiki']),
66
+            new \Twig_SimpleFunction('getReplagThreshold', [$this, 'getReplagThreshold']),
67
+            new \Twig_SimpleFunction('loadStylesheetsFromCDN', [$this, 'loadStylesheetsFromCDN']),
68
+            new \Twig_SimpleFunction('isWMFLabs', [$this, 'isWMFLabs']),
69
+            new \Twig_SimpleFunction('replag', [$this, 'replag']),
70
+            new \Twig_SimpleFunction('link', [$this, 'link']),
71
+            new \Twig_SimpleFunction('quote', [$this, 'quote']),
72
+            new \Twig_SimpleFunction('bugReportURL', [$this, 'bugReportURL']),
73 73
             new \Twig_SimpleFunction('logged_in_user', [$this, 'functionLoggedInUser']),
74 74
             new \Twig_SimpleFunction('isUserAnon', [$this, 'isUserAnon']),
75 75
             new \Twig_SimpleFunction('nsName', [$this, 'nsName']),
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     public function requestTime()
86 86
     {
87 87
         if (!isset($this->requestTime)) {
88
-            $this->requestTime = microtime(true) - $this->getCurrentRequest()->server->get('REQUEST_TIME_FLOAT');
88
+            $this->requestTime = microtime(true)-$this->getCurrentRequest()->server->get('REQUEST_TIME_FLOAT');
89 89
         }
90 90
 
91 91
         return $this->requestTime;
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function intuitionMessage($message = "", $vars = [])
160 160
     {
161
-        return $this->getIntuition()->msg($message, [ "domain" => "xtools", "variables" => $vars ]);
161
+        return $this->getIntuition()->msg($message, ["domain" => "xtools", "variables" => $vars]);
162 162
     }
163 163
 
164 164
     /**
@@ -187,10 +187,10 @@  discard block
 block discarded – undo
187 187
      */
188 188
     public function getAllLangs()
189 189
     {
190
-        $messageFiles = glob($this->container->getParameter("kernel.root_dir") . '/../i18n/*.json');
190
+        $messageFiles = glob($this->container->getParameter("kernel.root_dir").'/../i18n/*.json');
191 191
 
192 192
         $languages = array_values(array_unique(array_map(
193
-            function ($filename) {
193
+            function($filename) {
194 194
                 return basename($filename, '.json');
195 195
             },
196 196
             $messageFiles
@@ -537,9 +537,9 @@  discard block
 block discarded – undo
537 537
     public function getFilters()
538 538
     {
539 539
         return [
540
-            new \Twig_SimpleFilter('capitalize_first', [ $this, 'capitalizeFirst' ]),
541
-            new \Twig_SimpleFilter('percent_format', [ $this, 'percentFormat' ]),
542
-            new \Twig_SimpleFilter('diff_format', [ $this, 'diffFormat' ], [ 'is_safe' => [ 'html' ] ]),
540
+            new \Twig_SimpleFilter('capitalize_first', [$this, 'capitalizeFirst']),
541
+            new \Twig_SimpleFilter('percent_format', [$this, 'percentFormat']),
542
+            new \Twig_SimpleFilter('diff_format', [$this, 'diffFormat'], ['is_safe' => ['html']]),
543 543
             new \Twig_SimpleFilter('num_format', [$this, 'numberFormat']),
544 544
             new \Twig_SimpleFilter('date_format', [$this, 'dateFormat']),
545 545
         ];
@@ -613,10 +613,10 @@  discard block
 block discarded – undo
613 613
         if (!$denominator) {
614 614
             $quotient = $numerator;
615 615
         } else {
616
-            $quotient = ( $numerator / $denominator ) * 100;
616
+            $quotient = ($numerator / $denominator) * 100;
617 617
         }
618 618
 
619
-        return $this->numberFormat($quotient, $precision) . '%';
619
+        return $this->numberFormat($quotient, $precision).'%';
620 620
     }
621 621
 
622 622
     /**
@@ -691,20 +691,20 @@  discard block
 block discarded – undo
691 691
 
692 692
         if ($seconds >= 86400) {
693 693
             // Over a day
694
-            $val = (int) floor($seconds / 86400);
694
+            $val = (int)floor($seconds / 86400);
695 695
             $key = 'days';
696 696
         } elseif ($seconds >= 3600) {
697 697
             // Over an hour, less than a day
698
-            $val = (int) floor($seconds / 3600);
698
+            $val = (int)floor($seconds / 3600);
699 699
             $key = 'hours';
700 700
         } elseif ($seconds >= 60) {
701 701
             // Over a minute, less than an hour
702
-            $val = (int) floor($seconds / 60);
702
+            $val = (int)floor($seconds / 60);
703 703
             $key = 'minutes';
704 704
         }
705 705
 
706 706
         if ($translate) {
707
-            return $this->numberFormat($val) . ' ' . $this->intuitionMessage("num-$key", [$val]);
707
+            return $this->numberFormat($val).' '.$this->intuitionMessage("num-$key", [$val]);
708 708
         } else {
709 709
             return [$this->numberFormat($val), "num-$key"];
710 710
         }
Please login to merge, or discard this patch.
src/Xtools/User.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             return $this->editCounts[$domain];
93 93
         }
94 94
 
95
-        $this->editCounts[$domain] = (int) $this->getRepository()->getEditCount(
95
+        $this->editCounts[$domain] = (int)$this->getRepository()->getEditCount(
96 96
             $project->getDatabaseName(),
97 97
             $this->getUsername()
98 98
         );
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function isAnon()
160 160
     {
161
-        return (bool) filter_var($this->username, FILTER_VALIDATE_IP);
161
+        return (bool)filter_var($this->username, FILTER_VALIDATE_IP);
162 162
     }
163 163
 
164 164
     /**
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
      */
221 221
     public function countEdits(Project $project, $namespace = 'all', $start = '', $end = '')
222 222
     {
223
-        return (int) $this->getRepository()->countEdits($project, $this, $namespace, $start, $end);
223
+        return (int)$this->getRepository()->countEdits($project, $this, $namespace, $start, $end);
224 224
     }
225 225
 
226 226
     /**
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      */
234 234
     public function countAutomatedEdits(Project $project, $namespace = 'all', $start = '', $end = '')
235 235
     {
236
-        return (int) $this->getRepository()->countAutomatedEdits($project, $this, $namespace, $start, $end);
236
+        return (int)$this->getRepository()->countAutomatedEdits($project, $this, $namespace, $start, $end);
237 237
     }
238 238
 
239 239
     /**
@@ -265,12 +265,12 @@  discard block
 block discarded – undo
265 265
 
266 266
         $namespaces = $project->getNamespaces();
267 267
 
268
-        return array_map(function ($rev) use ($namespaces) {
268
+        return array_map(function($rev) use ($namespaces) {
269 269
             $pageTitle = $rev['page_title'];
270 270
             $fullPageTitle = '';
271 271
 
272 272
             if ($rev['page_namespace'] !== '0') {
273
-                $fullPageTitle = $namespaces[$rev['page_namespace']] . ":$pageTitle";
273
+                $fullPageTitle = $namespaces[$rev['page_namespace']].":$pageTitle";
274 274
             } else {
275 275
                 $fullPageTitle = $pageTitle;
276 276
             }
@@ -278,12 +278,12 @@  discard block
 block discarded – undo
278 278
             return [
279 279
                 'full_page_title' => $fullPageTitle,
280 280
                 'page_title' => $pageTitle,
281
-                'page_namespace' => (int) $rev['page_namespace'],
282
-                'rev_id' => (int) $rev['rev_id'],
281
+                'page_namespace' => (int)$rev['page_namespace'],
282
+                'rev_id' => (int)$rev['rev_id'],
283 283
                 'timestamp' => DateTime::createFromFormat('YmdHis', $rev['timestamp']),
284
-                'minor' => (bool) $rev['minor'],
285
-                'length' => (int) $rev['length'],
286
-                'length_change' => (int) $rev['length_change'],
284
+                'minor' => (bool)$rev['minor'],
285
+                'length' => (int)$rev['length'],
286
+                'length_change' => (int)$rev['length_change'],
287 287
                 'comment' => $rev['comment'],
288 288
             ];
289 289
         }, $revs);
Please login to merge, or discard this patch.
src/Xtools/TopEdits.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
         $displayTitles = $this->getDisplayTitles($pages);
120 120
 
121 121
         foreach ($pages as $page) {
122
-            $nsId = (int) $page['page_namespace'];
123
-            $nsTitle = $nsId > 0 ? $this->project->getNamespaces()[$page['page_namespace']] . ':' : '';
124
-            $pageTitle = $nsTitle . $page['page_title'];
122
+            $nsId = (int)$page['page_namespace'];
123
+            $nsTitle = $nsId > 0 ? $this->project->getNamespaces()[$page['page_namespace']].':' : '';
124
+            $pageTitle = $nsTitle.$page['page_title'];
125 125
             $page['displaytitle'] = $displayTitles[$pageTitle];
126 126
 
127 127
             // $page['page_title'] is retained without the namespace
@@ -148,11 +148,11 @@  discard block
 block discarded – undo
148 148
         $namespaces = $this->project->getNamespaces();
149 149
 
150 150
         // First extract page titles including namespace.
151
-        $pageTitles = array_map(function ($page) use ($namespaces) {
151
+        $pageTitles = array_map(function($page) use ($namespaces) {
152 152
             // If non-mainspace, prepend namespace to the titles.
153 153
             $ns = $page['page_namespace'];
154
-            $nsTitle = $ns > 0 ? $namespaces[$page['page_namespace']] . ':' : '';
155
-            return $nsTitle . $page['page_title'];
154
+            $nsTitle = $ns > 0 ? $namespaces[$page['page_namespace']].':' : '';
155
+            return $nsTitle.$page['page_title'];
156 156
         }, $topPages);
157 157
 
158 158
         return $this->getRepository()->getDisplayTitles($this->project, $pageTitles);
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -5,9 +5,6 @@
 block discarded – undo
5 5
 
6 6
 namespace Xtools;
7 7
 
8
-use Symfony\Component\DependencyInjection\Container;
9
-use DateTime;
10
-
11 8
 /**
12 9
  * TopEdits returns the top-edited pages by a user.
13 10
  */
Please login to merge, or discard this patch.
src/AppBundle/Controller/DeleteCounterController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use Symfony\Component\HttpFoundation\Response;
13 13
 use Xtools\Project;
14 14
 use Xtools\ProjectRepository;
15
-use Xtools\User;
16 15
 use Xtools\UserRepository;
17 16
 
18 17
 /**
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
         // If we've got a project and user, redirect to results.
58 58
         if ($projectName != '' && $username != '') {
59
-            $routeParams = [ 'project' => $projectName, 'username' => $username ];
59
+            $routeParams = ['project' => $projectName, 'username' => $username];
60 60
             return $this->redirectToRoute(
61 61
                 'DeletionCounterResult',
62 62
                 $routeParams
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         $types = $this->container->getParameter("deletion_counter");
128 128
 
129 129
         if (!isset($types[$domain])) {
130
-            $this->addFlash('notice', [ 'no-result', $username ]);
130
+            $this->addFlash('notice', ['no-result', $username]);
131 131
             return $this->redirectToRoute(
132 132
                 'DeletionCounter',
133 133
                 [
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         $resultQuery->execute();
154 154
 
155 155
         if ($resultQuery->errorCode() > 0) {
156
-            $this->addFlash('notice', [ 'no-result', $username ]);
156
+            $this->addFlash('notice', ['no-result', $username]);
157 157
             return $this->redirectToRoute(
158 158
                 'DeletionCounterProject',
159 159
                 [
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         $resultData = $resultQuery->fetchAll();
167 167
 
168 168
         if (count($resultData) == 0) {
169
-            $this->addFlash('notice', [ 'no-result', $username ]);
169
+            $this->addFlash('notice', ['no-result', $username]);
170 170
             return $this->redirectToRoute(
171 171
                 'DeletionCounterProject',
172 172
                 [
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         // Unknown user or generated no results
186 186
         // This is a workaround to detect non-existent IPs.
187 187
         if (count($results) == 0) {
188
-            $this->addFlash('notice', [ 'no-result', $username ]);
188
+            $this->addFlash('notice', ['no-result', $username]);
189 189
 
190 190
             return $this->redirectToRoute(
191 191
                 'DeletionCounterProject',
Please login to merge, or discard this patch.
src/Xtools/TopEditsRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         $hasPageAssessments = $this->isLabs() && $project->hasPageAssessments() && $namespace === 0;
39 39
         $paSelect = $hasPageAssessments
40
-            ?  ", (
40
+            ? ", (
41 41
                     SELECT pa_class
42 42
                     FROM page_assessments
43 43
                     WHERE pa_page_id = page_id
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $hasPageAssessments = $this->isLabs() && $project->hasPageAssessments();
93 93
         $pageAssessmentsTable = $this->getTableName($project->getDatabaseName(), 'page_assessments');
94 94
         $paSelect = $hasPageAssessments
95
-            ?  ", (
95
+            ? ", (
96 96
                     SELECT pa_class
97 97
                     FROM $pageAssessmentsTable
98 98
                     WHERE pa_page_id = e.page_id
Please login to merge, or discard this patch.
src/AppBundle/Controller/TopEditsController.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
      * @param Request $request The HTTP request.
157 157
      * @param User $user The User.
158 158
      * @param Project $project The project.
159
-     * @param integer|string $namespace The namespace ID or 'all'
159
+     * @param integer $namespace The namespace ID or 'all'
160 160
      * @return \Symfony\Component\HttpFoundation\Response
161 161
      * @codeCoverageIgnore
162 162
      */
Please login to merge, or discard this patch.
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -11,12 +11,8 @@
 block discarded – undo
11 11
 use Symfony\Component\HttpFoundation\RedirectResponse;
12 12
 use Symfony\Component\HttpFoundation\Request;
13 13
 use Symfony\Component\HttpFoundation\Response;
14
-use Xtools\Page;
15
-use Xtools\PagesRepository;
16 14
 use Xtools\Project;
17
-use Xtools\ProjectRepository;
18 15
 use Xtools\User;
19
-use Xtools\UserRepository;
20 16
 use Xtools\TopEdits;
21 17
 use Xtools\TopEditsRepository;
22 18
 use Xtools\Edit;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
         // Send all to the template.
192 192
         return $this->render('topedits/result_article.html.twig', [
193 193
             'xtPage' => 'topedits',
194
-            'xtTitle' => $user->getUsername() . ' - ' . $page->getTitle(),
194
+            'xtTitle' => $user->getUsername().' - '.$page->getTitle(),
195 195
             'project' => $project,
196 196
             'user' => $user,
197 197
             'page' => $page,
Please login to merge, or discard this patch.