Passed
Push — master ( 606919...d35033 )
by Maja
07:18 queued 23s
created
web/lib/user/TextTemplates.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 namespace web\lib\user;
12 12
 
13
-require_once(ROOT."/config/_config.php");
13
+require_once(ROOT . "/config/_config.php");
14 14
 /**
15 15
  * these constants live in the global space just to ease their use - with class
16 16
  * prefix, the names simply get too long for comfort
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
         $this->templates[WELCOME_ABOARD_BACKTODOWNLOADS] = _("Back to downloads");
73 73
         $this->templates[EDUROAM_WELCOME_ADVERTISING] = sprintf(_("we would like to warmly welcome you among the several million users of %s! From now on, you will be able to use internet access resources on thousands of universities, research centres and other places all over the globe. All of this completely free of charge!"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
74 74
         $this->templates[HEADING_TOPLEVEL_GREET] = sprintf(_("Welcome to %s"), CONFIG['APPEARANCE']['productname']);
75
-        $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
75
+        $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
76 76
         $this->templates[FRONTPAGE_ROLLER_EASY] = sprintf(_("%s installation made easy:"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
77
-        $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = sprintf(_("Custom built for your %s"),$parent->nomenclature_inst);       
77
+        $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = sprintf(_("Custom built for your %s"), $parent->nomenclature_inst);       
78 78
         $this->templates[FRONTPAGE_BIGDOWNLOADBUTTON] = sprintf(_("Click here to download your %s installer"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
79 79
         $this->templates[PROFILE_SELECTION] = _("Select the user group");
80 80
         $this->templates[INSTITUTION_SELECTION] = _("select another");
Please login to merge, or discard this patch.
devices/ms/Device_Vista7.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
             $profileFileCont .= '
163 163
 </ServerSideCredential>
164 164
 <InnerAuthenticationMethod>
165
-<NonEAPAuthMethod>' .$innerMethod. '</NonEAPAuthMethod>
165
+<NonEAPAuthMethod>' .$innerMethod . '</NonEAPAuthMethod>
166 166
 </InnerAuthenticationMethod>
167 167
 <VendorSpecific>
168 168
 <SessionResumption>false</SessionResumption>
Please login to merge, or discard this patch.
web/diag/magicTelepath.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  */
11 11
 require_once(dirname(dirname(__DIR__)) . "/config/_config.php");
12 12
 $realm = filter_input(INPUT_GET, 'realm', FILTER_SANITIZE_STRING);
13
-$visited = filter_input(INPUT_GET,'visited', FILTER_SANITIZE_STRING);
13
+$visited = filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING);
14 14
 if (session_status != PHP_SESSION_ACTIVE) {
15 15
     session_start();
16 16
 }
Please login to merge, or discard this patch.
web/diag/findRealm.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
  *
17 17
  * @package Developer
18 18
  */
19
-function check_my_nonce($nonce, $optSalt='') {
19
+function check_my_nonce($nonce, $optSalt = '') {
20 20
     $remote = filter_input(INPUT_SERVER, 'REMOTE_ADDR');
21
-    $lasthour = date("G")-1<0 ? date('Ymd').'23' : date("YmdG")-1;
22
-    if (hash_hmac('sha256', session_id().$optSalt, date("YmdG").'1qaz2wsx3edc!QAZ@WSX#EDC'.$remote) == $nonce || 
23
-        hash_hmac('sha256', session_id().$optSalt, $lasthour.'1qaz2wsx3edc!QAZ@WSX#EDC'.$remote) == $nonce) {
21
+    $lasthour = date("G") - 1 < 0 ? date('Ymd') . '23' : date("YmdG") - 1;
22
+    if (hash_hmac('sha256', session_id() . $optSalt, date("YmdG") . '1qaz2wsx3edc!QAZ@WSX#EDC' . $remote) == $nonce || 
23
+        hash_hmac('sha256', session_id() . $optSalt, $lasthour . '1qaz2wsx3edc!QAZ@WSX#EDC' . $remote) == $nonce) {
24 24
         return true;
25 25
     } else {
26 26
         return false;
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                 foreach ($details['admins'] as $admin) {
53 53
                     $admins[] = $admin['email'];
54 54
                 }
55
-                $details['admins'] = base64_encode(join(',',$admins));
55
+                $details['admins'] = base64_encode(join(',', $admins));
56 56
             } else {
57 57
                 $details['admins'] = '';
58 58
             }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                     $details = $cat->getExternalDBEntityDetails($realmOu);
87 87
                     if (!empty($details)) {
88 88
                         $returnArray['status'] = 1;
89
-                        $returnArray['realms'] = explode(',',$details['realmlist']);
89
+                        $returnArray['realms'] = explode(',', $details['realmlist']);
90 90
                     }   
91 91
                 }
92 92
             }
Please login to merge, or discard this patch.
web/lib/admin/UIElements.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $dummy_inst1 = _("identity provider");
48 48
         $dummy_inst2 = _("organisation");
49 49
         // and do something useless with the strings so that there's no "unused" complaint
50
-        if ( $dummy_NRO . $dummy_inst1 . $dummy_inst2 == "") {
50
+        if ($dummy_NRO . $dummy_inst1 . $dummy_inst2 == "") {
51 51
             // Oh well.
52 52
         }
53 53
         $this->nomenclature_fed = _(CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']);
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                         }
187 187
                         break;
188 188
                     case "boolean":
189
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>";
189
+                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off")) . "</strong></td></tr>";
190 190
                         break;
191 191
                     default:
192 192
                         $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>";
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
     
314 314
     private function checkROWIDpresence($reference) {
315 315
         $found = preg_match("/^ROWID-.*/", $reference);
316
-        if ($found  != 1) { // get excited on not-found AND on execution error
316
+        if ($found != 1) { // get excited on not-found AND on execution error
317 317
             throw new Exception("Error, ROWID expected.");
318 318
         }
319 319
     }
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 
337 337
         $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']);
338 338
         $details['name'] = preg_replace('/\//', "", $details['name']);
339
-        $certstatus = ( $details['root'] == 1 ? "R" : "I");
339
+        $certstatus = ($details['root'] == 1 ? "R" : "I");
340 340
         if ($details['ca'] == 0 && $details['root'] != 1) {
341 341
             return "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon;  border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . _("This is a <strong>SERVER</strong> certificate!") . "<br/>" . $details['name'] . "</div>";
342 342
         }
Please login to merge, or discard this patch.
web/admin/inc/manageDBLink.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
 // if we have a pushed close button, submit attributes and send user back to the overview page
26 26
 // if external DB sync is disabled globally, the user never gets to this page. If he came here *anyway* -> send him back immediately.
27
-if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_CLOSE ) || CONFIG['DB']['enforce-external-sync'] == FALSE) {
27
+if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_CLOSE) || CONFIG['DB']['enforce-external-sync'] == FALSE) {
28 28
     header("Location: ../overview_federation.php");
29 29
     exit;
30 30
 }
Please login to merge, or discard this patch.
web/admin/inc/manageAdmins.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
 
160 160
         echo "</td>
161 161
               <td>
162
-                <form action='inc/manageAdmins.inc.php?inst_id=" . $my_inst->identifier . "' method='post' " . ( $oneowner['ID'] != $_SESSION['user'] ? "onsubmit='popupRedirectWindow(this); return false;'" : "" ) . " accept-charset='UTF-8'>
162
+                <form action='inc/manageAdmins.inc.php?inst_id=" . $my_inst->identifier . "' method='post' " . ($oneowner['ID'] != $_SESSION['user'] ? "onsubmit='popupRedirectWindow(this); return false;'" : "") . " accept-charset='UTF-8'>
163 163
                 <input type='hidden' name='admin_id' value='" . $oneowner['ID'] . "'></input>
164 164
                 <button type='submit' name='submitbutton' class='delete' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Delete Administrator") . "</button>
165 165
                 </form>
Please login to merge, or discard this patch.
core/IdP.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
                 case "SILVERBULLET":
192 192
                     $theProfile = new ProfileSilverbullet($identifier, $this);
193 193
                     $theProfile->addSupportedEapMethod(new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET), 1);
194
-                    $theProfile->setRealm($this->identifier."-".$theProfile->identifier."." . strtolower($this->federation) . strtolower(CONFIG_CONFASSISTANT['SILVERBULLET']['realm_suffix']));
194
+                    $theProfile->setRealm($this->identifier . "-" . $theProfile->identifier . "." . strtolower($this->federation) . strtolower(CONFIG_CONFASSISTANT['SILVERBULLET']['realm_suffix']));
195 195
                     return $theProfile;
196 196
                 default:
197 197
                     throw new Exception("This type of profile is unknown and can not be added.");
Please login to merge, or discard this patch.
core/ProfileSilverbullet.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -175,11 +175,11 @@  discard block
 block discarded – undo
175 175
     public function invitationMailBody($invitationLink) {
176 176
         $text = _("Hello!");
177 177
         $text .= "\n\n";
178
-        $text .= sprintf(_("A new %s access credential has been created for you by your network administrator."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
178
+        $text .= sprintf(_("A new %s access credential has been created for you by your network administrator."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
179 179
         $text .= " ";
180 180
         $text .= sprintf(_("Please follow the following link with the device you want to enable for %s to get a custom %s installation program just for you. You can click on the link, copy and paste it into a browser or scan the attached QR code."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
181 181
         $text .= "\n\n$invitationLink\n\n"; // gets replaced with the token value by getBody()
182
-        $text .= sprintf(_("Please keep this email or bookmark this link for future use. After picking up your %s installation program, you can use the same link to get status information about your %s account."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
182
+        $text .= sprintf(_("Please keep this email or bookmark this link for future use. After picking up your %s installation program, you can use the same link to get status information about your %s account."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
183 183
         $text .= "\n\n";
184 184
         $text .= _("Regards,");
185 185
         $text .= "\n\n";
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
                 $indexStatement = "$certstatus\t$expiryIndexTxt\t" . ($certstatus == "R" ? "$nowIndexTxt,unspecified" : "") . "\t$serialHex\tunknown\t/O=" . CONFIG_CONFASSISTANT['CONSORTIUM']['name'] . "/OU=$federation/CN=$cn/emailAddress=$cn\n";
463 463
                 $logHandle->debug(4, "index.txt contents-to-be: $indexStatement");
464 464
                 if (!file_put_contents($tempdir . "/index.txt", $indexStatement)) {
465
-                $logHandle->debug(1,"Unable to write openssl index.txt file for revocation handling!");
465
+                $logHandle->debug(1, "Unable to write openssl index.txt file for revocation handling!");
466 466
                 }
467 467
                 // index.txt.attr is dull but needs to exist
468 468
                 file_put_contents($tempdir . "/index.txt.attr", "unique_subject = yes\n");
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
         if ($invitationsResult->num_rows == 0) {
573 573
             $loggerInstance->debug(2, "Token  $tokenvalue not found in database or database query error!\n");
574 574
             return ["status" => self::SB_TOKENSTATUS_INVALID,
575
-                "cert_status" => [],];
575
+                "cert_status" => [], ];
576 576
         }
577 577
         // if not returned, we found the token in the DB
578 578
         $invitationRow = mysqli_fetch_object(/** @scrutinizer ignore-type */ $invitationsResult);
@@ -742,7 +742,7 @@  discard block
 block discarded – undo
742 742
                 throw new Exception("Impossible: the string ends with '/admin' but it's not possible to cut six characters from the end?!");
743 743
             }
744 744
         }
745
-        $link .= '/accountstatus/accountstatus.php?token='.$token;
745
+        $link .= '/accountstatus/accountstatus.php?token=' . $token;
746 746
         return $link;
747 747
     }
748 748
 
Please login to merge, or discard this patch.