Passed
Push — dependabot/composer/newinterna... ( 13eb18 )
by
unknown
04:37
created
includes/ConsoleTasks/MigrateToRoles.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
         foreach ($users as $user) {
30 30
             $toAdd = array('user');
31 31
 
32
-            if($user['status'] === 'Admin'){
32
+            if($user['status'] === 'Admin') {
33 33
                 $toAdd[] = 'admin';
34 34
             }
35 35
 
36
-            if($user['checkuser'] == 1){
36
+            if($user['checkuser'] == 1) {
37 37
                 $toAdd[] = 'checkuser';
38 38
             }
39 39
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             $log->setComment($logData);
61 61
             $log->save();
62 62
 
63
-            if($user['status'] === 'Admin' || $user['status'] === 'User'){
63
+            if($user['status'] === 'Admin' || $user['status'] === 'User') {
64 64
                 $update->execute(array('id' => $user['id']));
65 65
             }
66 66
         }
Please login to merge, or discard this patch.
includes/ApplicationBase.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,8 +142,7 @@
 block discarded – undo
142 142
 
143 143
         if ($siteConfiguration->getLocationProviderApiKey() === null) {
144 144
             $page->setLocationProvider(new FakeLocationProvider());
145
-        }
146
-        else {
145
+        } else {
147 146
             $page->setLocationProvider(
148 147
                 new IpLocationProvider(
149 148
                     $database,
Please login to merge, or discard this patch.
includes/Tasks/InternalPageBase.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -99,8 +99,7 @@  discard block
 block discarded – undo
99 99
         if ($securityResult === SecurityManager::ALLOWED) {
100 100
             // We're allowed to run the page, so let's run it.
101 101
             $this->runPage();
102
-        }
103
-        else {
102
+        } else {
104 103
             $this->handleAccessDenied($securityResult);
105 104
 
106 105
             // Send the headers
@@ -158,19 +157,16 @@  discard block
 block discarded – undo
158 157
             $this->redirect("login");
159 158
 
160 159
             return;
161
-        }
162
-        else {
160
+        } else {
163 161
             // Decide whether this was a rights failure, or an identification failure.
164 162
 
165 163
             if ($denyReason === SecurityManager::ERROR_NOT_IDENTIFIED) {
166 164
                 // Not identified
167 165
                 throw new NotIdentifiedException($this->getSecurityManager());
168
-            }
169
-            elseif ($denyReason === SecurityManager::ERROR_DENIED) {
166
+            } elseif ($denyReason === SecurityManager::ERROR_DENIED) {
170 167
                 // Nope, plain old access denied
171 168
                 throw new AccessDeniedException($this->getSecurityManager());
172
-            }
173
-            else {
169
+            } else {
174 170
                 throw new Exception('Unknown response from security manager.');
175 171
             }
176 172
         }
Please login to merge, or discard this patch.
includes/Tasks/PageBase.php 1 patch
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -217,8 +217,7 @@  discard block
 block discarded – undo
217 217
         // Are we changing script?
218 218
         if ($script === null || substr($currentScriptName, -1 * count($script)) === $script) {
219 219
             $targetScriptName = $currentScriptName;
220
-        }
221
-        else {
220
+        } else {
222 221
             $targetScriptName = $this->getSiteConfiguration()->getBaseUrl() . '/' . $script;
223 222
         }
224 223
 
@@ -277,8 +276,9 @@  discard block
 block discarded – undo
277 276
      *
278 277
      * @param string $path The path (relative to the application root) of the file
279 278
      */
280
-    final protected function addCss($path) {
281
-        if(in_array($path, $this->extraCss)){
279
+    final protected function addCss($path)
280
+    {
281
+        if(in_array($path, $this->extraCss)) {
282 282
             // nothing to do
283 283
             return;
284 284
         }
@@ -291,8 +291,9 @@  discard block
 block discarded – undo
291 291
      *
292 292
      * @param string $path The path (relative to the application root) of the file
293 293
      */
294
-    final protected function addJs($path){
295
-        if(in_array($path, $this->extraJs)){
294
+    final protected function addJs($path)
295
+    {
296
+        if(in_array($path, $this->extraJs)) {
296 297
             // nothing to do
297 298
             return;
298 299
         }
Please login to merge, or discard this patch.
includes/PdoDatabase.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,8 +89,7 @@
 block discarded – undo
89 89
         // all over the rest of the code
90 90
         if ($this->hasActiveTransaction) {
91 91
             return false;
92
-        }
93
-        else {
92
+        } else {
94 93
             // set the transaction isolation level for every transaction.
95 94
             $this->exec("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;");
96 95
 
Please login to merge, or discard this patch.
includes/DataObjects/GeoLocation.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,12 +60,10 @@
 block discarded – undo
60 60
 
61 61
             if ($statement->execute()) {
62 62
                 $this->id = (int)$this->dbObject->lastInsertId();
63
-            }
64
-            else {
63
+            } else {
65 64
                 throw new Exception($statement->errorInfo());
66 65
             }
67
-        }
68
-        else {
66
+        } else {
69 67
             // update
70 68
             $statement = $this->dbObject->prepare(<<<SQL
71 69
 UPDATE `geolocation`
Please login to merge, or discard this patch.
includes/DataObjects/RDnsCache.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,12 +59,10 @@
 block discarded – undo
59 59
 
60 60
             if ($statement->execute()) {
61 61
                 $this->id = (int)$this->dbObject->lastInsertId();
62
-            }
63
-            else {
62
+            } else {
64 63
                 throw new Exception($statement->errorInfo());
65 64
             }
66
-        }
67
-        else {
65
+        } else {
68 66
             // update
69 67
             $statement = $this->dbObject->prepare(<<<SQL
70 68
 UPDATE `rdnscache`
Please login to merge, or discard this patch.
includes/DataObjects/Comment.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@  discard block
 block discarded – undo
41 41
     {
42 42
         if ($showAll) {
43 43
             $statement = $database->prepare('SELECT * FROM comment WHERE request = :target;');
44
-        }
45
-        else {
44
+        } else {
46 45
             $statement = $database->prepare(<<<SQL
47 46
 SELECT * FROM comment
48 47
 WHERE request = :target AND (visibility = 'user' OR user = :userid);
@@ -84,12 +83,10 @@  discard block
 block discarded – undo
84 83
 
85 84
             if ($statement->execute()) {
86 85
                 $this->id = (int)$this->dbObject->lastInsertId();
87
-            }
88
-            else {
86
+            } else {
89 87
                 throw new Exception($statement->errorInfo());
90 88
             }
91
-        }
92
-        else {
89
+        } else {
93 90
             // update
94 91
             $statement = $this->dbObject->prepare(<<<SQL
95 92
 UPDATE comment
Please login to merge, or discard this patch.
includes/DataObjects/UserRole.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,12 +61,10 @@
 block discarded – undo
61 61
 
62 62
             if ($statement->execute()) {
63 63
                 $this->id = (int)$this->dbObject->lastInsertId();
64
-            }
65
-            else {
64
+            } else {
66 65
                 throw new Exception($statement->errorInfo());
67 66
             }
68
-        }
69
-        else {
67
+        } else {
70 68
             // update
71 69
             throw new Exception('Updating roles is not available');
72 70
         }
Please login to merge, or discard this patch.