Passed
Pull Request — master (#316)
by
unknown
17:11 queued 11:20
created
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.
src/AppBundle/Repository/PageAssessmentsRepository.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 PageAssessmentsRepository 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/AdminStatsRepository.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 AdminStatsRepository 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/CategoryEditsRepository.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 CategoryEditsRepository 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/UserRepository.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 UserRepository 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/Repository.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 Repository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Repository;
9 9
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             return null;
93 93
         }
94 94
 
95
-        $requestTime = microtime(true) - $request->server->get('REQUEST_TIME_FLOAT');
95
+        $requestTime = microtime(true)-$request->server->get('REQUEST_TIME_FLOAT');
96 96
 
97 97
         return [
98 98
             'requestTime' => round($requestTime, 2),
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         // $tableExtension in order to generate the new table name
190 190
         if ($this->isLabs() && null !== $tableExtension) {
191 191
             $mapped = true;
192
-            $tableName .=('' === $tableExtension ? '' : '_'.$tableExtension);
192
+            $tableName .= ('' === $tableExtension ? '' : '_'.$tableExtension);
193 193
         } elseif ($this->container->hasParameter("app.table.$tableName")) {
194 194
             // Use the table specified in the table mapping configuration, if present.
195 195
             $mapped = true;
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         // This is a safeguard in case table mapping isn't properly set up.
202 202
         $isLoggingOrRevision = in_array($tableName, ['revision', 'logging', 'archive']);
203 203
         if (!$mapped && $isLoggingOrRevision && $this->isLabs()) {
204
-            $tableName .="_userindex";
204
+            $tableName .= "_userindex";
205 205
         }
206 206
 
207 207
         // Figure out database name.
Please login to merge, or discard this patch.
src/AppBundle/Repository/SimpleEditCounterRepository.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 SimpleEditCounterRepository 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/Model/CategoryEdits.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 CategoryEdits class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     ) {
47 47
         $this->project = $project;
48 48
         $this->user = $user;
49
-        $this->categories = array_map(function ($category) {
49
+        $this->categories = array_map(function($category) {
50 50
             return str_replace(' ', '_', $category);
51 51
         }, $categories);
52 52
         $this->start = false === $start ? '' : date('Y-m-d', $start);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function getCategoriesNormalized(): array
80 80
     {
81
-        return array_map(function ($category) {
81
+        return array_map(function($category) {
82 82
             return str_replace('_', ' ', $category);
83 83
         }, $this->categories);
84 84
     }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
      */
184 184
     private function getEditsFromRevs(array $revs): array
185 185
     {
186
-        return array_map(function ($rev) {
186
+        return array_map(function($rev) {
187 187
             /** @var Page $page Page object to be passed to the Edit constructor. */
188 188
             $page = $this->getPageFromRev($rev);
189 189
             $rev['user'] = $this->user;
Please login to merge, or discard this patch.