Test Failed
Pull Request — master (#378)
by MusikAnimal
19:01
created
src/AppBundle/Model/PageAssessments.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
  * This file contains only the PageAssessments class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
Please login to merge, or discard this patch.
src/AppBundle/Model/AdminScore.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the AdminScore class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
                     $now = new DateTime();
104 104
                     $date = new DateTime($value);
105 105
                     $diff = $date->diff($now);
106
-                    $formula = 365 * (int)$diff->format('%y') + 30 *
107
-                        (int)$diff->format('%m') + (int)$diff->format('%d');
106
+                    $formula = 365 * (int)$diff->format('%y')+30 *
107
+                        (int)$diff->format('%m')+(int)$diff->format('%d');
108 108
                     if ($formula < 365) {
109 109
                         $this->multipliers['account-age-mult'] = 0;
110 110
                     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                 }
113 113
             }
114 114
 
115
-            $multiplierKey = $row['source'] . '-mult';
115
+            $multiplierKey = $row['source'].'-mult';
116 116
             $multiplier = $this->multipliers[$multiplierKey] ?? 1;
117 117
             $score = max(min($value * $multiplier, 100), -100);
118 118
             $this->scores[$key]['mult'] = $multiplier;
Please login to merge, or discard this patch.
src/AppBundle/Model/Pages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
  * This file contains only the Pages class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
Please login to merge, or discard this patch.
src/AppBundle/Repository/EditSummaryRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
  * This file contains only the EditSummaryRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Repository;
9 9
 
Please login to merge, or discard this patch.
src/AppBundle/Repository/AdminScoreRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
  * This file contains only the AdminScoreRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Repository;
9 9
 
Please login to merge, or discard this patch.
src/AppBundle/Controller/RfXAnalysisController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -112,12 +112,12 @@  discard block
 block discarded – undo
112 112
 
113 113
         // Construct the page name
114 114
         if (!isset($this->getParameter('rfx')[$domain]['pages'][$type])) {
115
-            $pageTitle= '';
115
+            $pageTitle = '';
116 116
         } else {
117
-            $pageTitle= $this->getParameter('rfx')[$domain]['pages'][$type];
117
+            $pageTitle = $this->getParameter('rfx')[$domain]['pages'][$type];
118 118
         }
119 119
 
120
-        $pageTitle.= '/'.$this->user->getUsername();
120
+        $pageTitle .= '/'.$this->user->getUsername();
121 121
         $page = new Page($this->project, $pageTitle);
122 122
         $pageRepo = new PageRepository();
123 123
         $pageRepo->setContainer($this->container);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         $neutral = $rfx->getSection('neutral');
146 146
         $dup = $rfx->getDuplicates();
147 147
 
148
-        $total = count($support) + count($oppose) + count($neutral);
148
+        $total = count($support)+count($oppose)+count($neutral);
149 149
 
150 150
         if (0 === $total) {
151 151
             $this->addFlashMessage('notice', 'no-result', [$pageTitle]);
Please login to merge, or discard this patch.
src/AppBundle/Controller/AutomatedEditsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
             'total_editcount' => $this->autoEdits->getEditCount(),
245 245
             'automated_editcount' => $this->autoEdits->getAutomatedCount(),
246 246
         ];
247
-        $ret['nonautomated_editcount'] = $ret['total_editcount'] - $ret['automated_editcount'];
247
+        $ret['nonautomated_editcount'] = $ret['total_editcount']-$ret['automated_editcount'];
248 248
 
249 249
         if ('' != $tools) {
250 250
             $tools = $this->autoEdits->getToolCounts();
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 
277 277
         $this->setupAutoEdits();
278 278
 
279
-        $ret = array_map(function ($rev) {
279
+        $ret = array_map(function($rev) {
280 280
             return array_merge([
281 281
                 'full_page_title' => $this->getPageFromNsAndTitle(
282 282
                     (int)$rev['page_namespace'],
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
             $ret['tool'] = $this->autoEdits->getTool();
318 318
         }
319 319
 
320
-        $ret['automated_edits'] = array_map(function ($rev) {
320
+        $ret['automated_edits'] = array_map(function($rev) {
321 321
             return array_merge([
322 322
                 'full_page_title' => $this->getPageFromNsAndTitle(
323 323
                     (int)$rev['page_namespace'],
Please login to merge, or discard this patch.
src/AppBundle/Helper/I18nHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the I18nHelper.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Helper;
9 9
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         }
75 75
 
76 76
         // Find the path, and complain if English doesn't exist.
77
-        $path = $this->container->getParameter('kernel.root_dir') . '/../i18n';
77
+        $path = $this->container->getParameter('kernel.root_dir').'/../i18n';
78 78
         if (!file_exists("$path/en.json")) {
79 79
             throw new Exception("Language directory doesn't exist: $path");
80 80
         }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $messageFiles = glob($this->container->getParameter('kernel.root_dir').'/../i18n/*.json');
130 130
 
131 131
         $languages = array_values(array_unique(array_map(
132
-            function ($filename) {
132
+            function($filename) {
133 133
                 return basename($filename, '.json');
134 134
             },
135 135
             $messageFiles
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             $this->getIntuition()->getLangFallbacks($this->getLang())
172 172
         );
173 173
 
174
-        return array_filter($fallbacks, function ($lang) use ($i18nPath) {
174
+        return array_filter($fallbacks, function($lang) use ($i18nPath) {
175 175
             return is_file($i18nPath.$lang.'.json');
176 176
         });
177 177
     }
Please login to merge, or discard this patch.
src/AppBundle/Repository/TopEditsRepository.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 TopEditsRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Repository;
9 9
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $hasPageAssessments = $this->isLabs() && $project->hasPageAssessments() && 0 === $namespace;
59 59
         $paTable = $this->getTableName($project->getDatabaseName(), 'page_assessments');
60 60
         $paSelect = $hasPageAssessments
61
-            ?  ", (
61
+            ? ", (
62 62
                     SELECT pa_class
63 63
                     FROM $paTable
64 64
                     WHERE pa_page_id = page_id
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         $hasPageAssessments = $this->isLabs() && $project->hasPageAssessments();
140 140
         $pageAssessmentsTable = $this->getTableName($project->getDatabaseName(), 'page_assessments');
141 141
         $paSelect = $hasPageAssessments
142
-            ?  ", (
142
+            ? ", (
143 143
                     SELECT pa_class
144 144
                     FROM $pageAssessmentsTable
145 145
                     WHERE pa_page_id = e.page_id
Please login to merge, or discard this patch.