Failed Conditions
Pull Request — bugsquish (#573)
by Simon
11:01 queued 08:44
created
includes/DataObjects/Ban.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -352,7 +352,7 @@
 block discarded – undo
352 352
      */
353 353
     public function setIp(?string $ip, ?int $mask): void
354 354
     {
355
-        if($ip === null) {
355
+        if ($ip === null) {
356 356
             $this->ip = null;
357 357
         } else {
358 358
             $this->ip = inet_pton($ip);
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -354,7 +354,8 @@
 block discarded – undo
354 354
     {
355 355
         if($ip === null) {
356 356
             $this->ip = null;
357
-        } else {
357
+        }
358
+        else {
358 359
             $this->ip = inet_pton($ip);
359 360
         }
360 361
 
Please login to merge, or discard this patch.
includes/Pages/PageBan.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             return;
51 51
         }
52 52
 
53
-        $idList = explode(',',$rawIdList);
53
+        $idList = explode(',', $rawIdList);
54 54
 
55 55
         $bans = Ban::getByIdList($idList, $this->getDatabase());
56 56
 
@@ -188,16 +188,16 @@  discard block
 block discarded – undo
188 188
         $targetMask = null;
189 189
 
190 190
         // check the user is allowed to use provided targets
191
-        if(!$this->barrierTest('name', $user, 'BanType')) {
191
+        if (!$this->barrierTest('name', $user, 'BanType')) {
192 192
             $targetName = null;
193 193
         }
194
-        if(!$this->barrierTest('ip', $user, 'BanType')) {
194
+        if (!$this->barrierTest('ip', $user, 'BanType')) {
195 195
             $targetIp = null;
196 196
         }
197
-        if(!$this->barrierTest('email', $user, 'BanType')) {
197
+        if (!$this->barrierTest('email', $user, 'BanType')) {
198 198
             $targetEmail = null;
199 199
         }
200
-        if(!$this->barrierTest('useragent', $user, 'BanType')) {
200
+        if (!$this->barrierTest('useragent', $user, 'BanType')) {
201 201
             $targetUseragent = null;
202 202
         }
203 203
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -215,7 +215,8 @@
 block discarded – undo
215 215
                 $ipParts = explode('/', $targetIp, 2);
216 216
                 $targetIp = $ipParts[0];
217 217
                 $targetMask = $ipParts[1];
218
-            } else {
218
+            }
219
+            else {
219 220
                 $targetMask = filter_var($targetIp, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) ? 128 : 32;
220 221
             }
221 222
 
Please login to merge, or discard this patch.
includes/Pages/Request/PageRequestAccount.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@
 block discarded – undo
208 208
     {
209 209
         $banHelper = new BanHelper($this->getDatabase(), $this->getXffTrustProvider(), null);
210 210
 
211
-        if($this->validationHelper === null) {
211
+        if ($this->validationHelper === null) {
212 212
             $this->validationHelper = new RequestValidationHelper(
213 213
                 $banHelper,
214 214
                 $this->getDatabase(),
Please login to merge, or discard this patch.
includes/Helpers/BanHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
             $this->banCache[$request->getId()] = $this->getBansForRequestFromDatabase($request);
47 47
         }
48 48
 
49
-        foreach($this->banCache[$request->getId()] as $ban) {
50
-            if($ban->getAction() === Ban::ACTION_BLOCK) {
49
+        foreach ($this->banCache[$request->getId()] as $ban) {
50
+            if ($ban->getAction() === Ban::ACTION_BLOCK) {
51 51
                 return true;
52 52
             }
53 53
         }
Please login to merge, or discard this patch.