Test Failed
Push — ip-ranges ( af8775 )
by MusikAnimal
07:44
created
src/AppBundle/EventSubscriber/RateLimitSubscriber.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the RateLimitSubscriber class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\EventSubscriber;
9 9
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $cacheItem = $this->cache->getItem($cacheKey);
138 138
 
139 139
         // If increment value already in cache, or start with 1.
140
-        $count = $cacheItem->isHit() ? (int) $cacheItem->get() + 1 : 1;
140
+        $count = $cacheItem->isHit() ? (int)$cacheItem->get()+1 : 1;
141 141
 
142 142
         // Check if limit has been exceeded, and if so, throw an error.
143 143
         if ($count > $this->rateLimit) {
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         $cacheItem = $this->cache->getItem($cacheKey);
178 178
 
179 179
         // If increment value already in cache, or start with 1.
180
-        $count = $cacheItem->isHit() ? (int)$cacheItem->get() + 1 : 1;
180
+        $count = $cacheItem->isHit() ? (int)$cacheItem->get()+1 : 1;
181 181
 
182 182
         // Check if limit has been exceeded, and if so, add a log entry.
183 183
         if ($count > 3) {
@@ -252,8 +252,8 @@  discard block
 block discarded – undo
252 252
         $message = $this->i18n->msg('error-rate-limit', [
253 253
             $this->rateDuration,
254 254
             "<a href='/login'>".$this->i18n->msg('error-rate-limit-login')."</a>",
255
-            "<a href='https://www.mediawiki.org/wiki/Special:MyLanguage/XTools/API' target='_blank'>" .
256
-                $this->i18n->msg('api') .
255
+            "<a href='https://www.mediawiki.org/wiki/Special:MyLanguage/XTools/API' target='_blank'>".
256
+                $this->i18n->msg('api').
257 257
             "</a>",
258 258
         ]);
259 259
 
Please login to merge, or discard this patch.
src/AppBundle/Controller/XtoolsController.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
             throw new XtoolsHttpException(
203 203
                 $this->i18n->msg('not-opted-in', [
204 204
                     $this->getOptedInPage()->getTitle(),
205
-                    $this->i18n->msg('not-opted-in-link') .
205
+                    $this->i18n->msg('not-opted-in-link').
206 206
                         ' <https://www.mediawiki.org/wiki/XTools/Edit_Counter#restricted_stats>',
207 207
                     $this->i18n->msg('not-opted-in-login'),
208 208
                 ]),
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
         $params = $this->convertLegacyParams($params);
643 643
 
644 644
         // Remove blank values.
645
-        return array_filter($params, function ($param) {
645
+        return array_filter($params, function($param) {
646 646
             // 'namespace' or 'username' could be '0'.
647 647
             return null !== $param && '' !== $param;
648 648
         });
@@ -843,7 +843,7 @@  discard block
 block discarded – undo
843 843
         }
844 844
 
845 845
         $elapsedTime = round(
846
-            microtime(true) - $this->request->server->get('REQUEST_TIME_FLOAT'),
846
+            microtime(true)-$this->request->server->get('REQUEST_TIME_FLOAT'),
847 847
             3
848 848
         );
849 849
 
@@ -886,7 +886,7 @@  discard block
 block discarded – undo
886 886
         $conn = $this->container->get('doctrine')
887 887
             ->getManager('default')
888 888
             ->getConnection();
889
-        $date =  date('Y-m-d');
889
+        $date = date('Y-m-d');
890 890
 
891 891
         // Increment count in timeline
892 892
         $existsSql = "SELECT 1 FROM usage_api_timeline
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -434,8 +434,9 @@
 block discarded – undo
434 434
         // Allow querying for any IP, currently with no edit count limitation...
435 435
         // Once T188677 is resolved IPs will be affected by the EXPLAIN results.
436 436
         if ($user->isAnon()) {
437
-            if ($user->isIpRange() && )
438
-            return $user;
437
+            if ($user->isIpRange() && ) {
438
+                        return $user;
439
+            }
439 440
         }
440 441
 
441 442
         $originalParams = $this->params;
Please login to merge, or discard this patch.
src/AppBundle/Repository/SimpleEditCounterRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 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
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $revDateConditions = $this->getDateConditions($start, $end, false, "$ipcTable.", 'ipc_rev_timestamp');
124 124
         [$startHex, $endHex] = IPUtils::parseRange($user->getUsername());
125 125
 
126
-        $revNamespaceJoinSql = 'all' === $namespace ? '' : "JOIN $revTable ON rev_id = ipc_rev_id " .
126
+        $revNamespaceJoinSql = 'all' === $namespace ? '' : "JOIN $revTable ON rev_id = ipc_rev_id ".
127 127
             "JOIN $pageTable ON rev_page = page_id";
128 128
         $revNamespaceWhereSql = 'all' === $namespace ? '' : "AND page_namespace = $namespace";
129 129
 
Please login to merge, or discard this patch.