Passed
Push — master ( 731f35...70cda0 )
by Maja
06:41
created
devices/xml/DeviceXML.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
         $this->marshalObject($root, $eapIdp);
147 147
         $dom = dom_import_simplexml($root)->ownerDocument;
148 148
         //TODO schema validation makes sense so probably should be used
149
-        if ($dom->schemaValidate(ROOT . '/devices/xml/eap-metadata.xsd') === FALSE) {
149
+        if ($dom->schemaValidate(ROOT.'/devices/xml/eap-metadata.xsd') === FALSE) {
150 150
             throw new Exception("Schema validation failed for eap-metadata");
151 151
         }
152
-        file_put_contents($this->installerBasename . '.eap-config', $dom->saveXML());
153
-        return($this->installerBasename . '.eap-config');
152
+        file_put_contents($this->installerBasename.'.eap-config', $dom->saveXML());
153
+        return($this->installerBasename.'.eap-config');
154 154
     }
155 155
 
156 156
     private const ATTRIBUTENAMES = [
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             $this->loggerInstance->debug(4, "Missing class definition for $attrName\n");
177 177
             return([]);
178 178
         }
179
-        $className = "\devices\xml\\" . self::ATTRIBUTENAMES[$attrName];
179
+        $className = "\devices\xml\\".self::ATTRIBUTENAMES[$attrName];
180 180
         $objs = [];
181 181
         if ($this->langScope === 'global') {
182 182
             foreach ($attributeList['langs'] as $language => $value) {
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
                 $displayname = new DisplayName();
215 215
                 if (isset($profileNameLangs)) {
216 216
                     $langOrC = isset($profileNameLangs[$language]) ? $profileNameLangs[$language] : $profileNameLangs['C'];
217
-                    $value .= ' - ' . $langOrC;
217
+                    $value .= ' - '.$langOrC;
218 218
                 }
219 219
                 $displayname->setValue($value);
220 220
                 $displayname->setAttributes(['lang' => $language]);
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
             $displayname = new DisplayName();
225 225
             $value = $attr['general:instname'][0];
226 226
             if ($attr['internal:profile_count'][0] > 1) {
227
-                $value .= ' - ' . $attr['profile:name'][0];
227
+                $value .= ' - '.$attr['profile:name'][0];
228 228
             }
229 229
             $displayname->setValue($value);
230 230
             $objs[] = $displayname;
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         $attr = $this->attributes;
242 242
         if (isset($attr['general:logo_file'][0])) {
243 243
             $logoString = base64_encode($attr['general:logo_file'][0]);
244
-            $logoMime = 'image/' . $attr['internal:logo_file'][0]['mime'];
244
+            $logoMime = 'image/'.$attr['internal:logo_file'][0]['mime'];
245 245
             $providerlogo = new ProviderLogo();
246 246
             $providerlogo->setAttributes(['mime' => $logoMime, 'encoding' => 'base64']);
247 247
             $providerlogo->setValue($logoString);
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 
347 347
         if (isset($inner["METHOD"]) && $inner["METHOD"]) {
348 348
             $innerauthmethod = new InnerAuthenticationMethod();
349
-            $typeOfInner = "\devices\xml\\" . ($inner["EAP"] ? 'EAPMethod' : 'NonEAPAuthMethod');
349
+            $typeOfInner = "\devices\xml\\".($inner["EAP"] ? 'EAPMethod' : 'NonEAPAuthMethod');
350 350
             $eapmethod = new $typeOfInner();
351 351
             $eaptype = new Type();
352 352
             $eaptype->setValue($inner['METHOD']);
Please login to merge, or discard this patch.
utils/installTranslations.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
  * License: see the web/copyright.php file in the file structure
9 9
  * ******************************************************************************
10 10
  */
11
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
11
+require_once dirname(dirname(__FILE__))."/config/_config.php";
12 12
 
13 13
 const AREAS = ["web_admin", "web_user", "devices", "core", "diagnostics"];
14 14
 foreach (\config\Master::LANGUAGES as $lang => $details) {
Please login to merge, or discard this patch.
web/skins/modern/accountstatus/accountstatus.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 $Gui->loggerInstance->debug(4, $operatingSystem);
48 48
 $uiElements = new web\lib\admin\UIElements();
49 49
 if ($operatingSystem) {
50
-    print "recognisedOS = '" . $operatingSystem['device'] . "';\n";
50
+    print "recognisedOS = '".$operatingSystem['device']."';\n";
51 51
 }
52
-require dirname(__DIR__) . '/user/js/cat_js.php';
52
+require dirname(__DIR__).'/user/js/cat_js.php';
53 53
 ?>
54 54
     var lang = "<?php echo($Gui->languageInstance->getLang()) ?>";
55 55
 </script>
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                         <?php
80 80
                         switch ($statusInfo['errorcode']) {
81 81
                             case "GENERATOR_CONSUMED":
82
-                                echo $uiElements->boxError(_("You attempted to download an installer that was already downloaded before. Please request a new token from your administrator instead."), _("Attempt to re-use download link"), TRUE) . "<p>";
82
+                                echo $uiElements->boxError(_("You attempted to download an installer that was already downloaded before. Please request a new token from your administrator instead."), _("Attempt to re-use download link"), TRUE)."<p>";
83 83
                                 break;
84 84
                             case NULL:
85 85
                             default:
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                                     echo " ";
103 103
                                     echo sprintf(ngettext("<strong>%d</strong> of your credentials is not valid any more.", "<strong>%d</strong> of your credentials are not valid any more.", $noGoodCerts), $noGoodCerts);
104 104
                                 }
105
-                                echo " <span id='detailtext'>" . _("I want to see the details.") . "</span>";
105
+                                echo " <span id='detailtext'>"._("I want to see the details.")."</span>";
106 106
                                 echo "<table id='cert_details'></table>";
107 107
                             }
108 108
                         }
@@ -111,60 +111,60 @@  discard block
 block discarded – undo
111 111
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_VALID: // treat both cases as equal
112 112
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_PARTIALLY_REDEEMED:
113 113
                                 if ($statusInfo['invitation_object']->activationsTotal > 1) { // only show this extra info in the non-trivial case.
114
-                                    echo "<h3>" . sprintf(_("Your invitation token is valid for %d more device activations (%d have already been used)."), $statusInfo['invitation_object']->activationsRemaining, $statusInfo['invitation_object']->activationsTotal - $statusInfo['invitation_object']->activationsRemaining) . "</h3>";
114
+                                    echo "<h3>".sprintf(_("Your invitation token is valid for %d more device activations (%d have already been used)."), $statusInfo['invitation_object']->activationsRemaining, $statusInfo['invitation_object']->activationsTotal - $statusInfo['invitation_object']->activationsRemaining)."</h3>";
115 115
                                 }
116 116
                                 if (!$statusInfo["OS"]) {
117
-                                    echo "<p>" . _("Unfortunately, we are unable to determine your device's operating system. If you have made modifications on your device which prevent it from being recognised (e.g. custom 'User Agent' settings), please undo such modifications. You can come back to this page again; the invitation link has not been used up yet.") . "</p>";
117
+                                    echo "<p>"._("Unfortunately, we are unable to determine your device's operating system. If you have made modifications on your device which prevent it from being recognised (e.g. custom 'User Agent' settings), please undo such modifications. You can come back to this page again; the invitation link has not been used up yet.")."</p>";
118 118
                                     break;
119 119
                                 }
120 120
 
121 121
                                 $dev = new \core\DeviceFactory($statusInfo['OS']['device']);
122 122
                                 $dev->device->calculatePreferredEapType([new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET)]);
123 123
                                 if ($dev->device->selectedEap == []) {
124
-                                    echo "<p>" . sprintf(_("Unfortunately, the operating system your device uses (%s) is currently not supported for hosted end-user accounts. You can visit this page with a supported operating system later; the invitation link has not been used up yet."), $statusInfo['OS']['display']) . "</p>";
124
+                                    echo "<p>".sprintf(_("Unfortunately, the operating system your device uses (%s) is currently not supported for hosted end-user accounts. You can visit this page with a supported operating system later; the invitation link has not been used up yet."), $statusInfo['OS']['display'])."</p>";
125 125
                                     break;
126 126
                                 }
127
-                                $message = $dev->device->options['message'] ?? '' ;
127
+                                $message = $dev->device->options['message'] ?? '';
128 128
 
129 129
                                 $sbMessage = $dev->device->options['sb_message'] ?? '';
130 130
                                 if ($message != '' && $sbMessage != '') {
131
-                                    $message = $message . "<p>" . $sbMessage;
131
+                                    $message = $message."<p>".$sbMessage;
132 132
                                 } else {
133
-                                    $message = $message . $sbMessage;
133
+                                    $message = $message.$sbMessage;
134 134
                                 }
135 135
                          
136
-                                echo "<div id='sb_download_message'><p>" . sprintf(_("You can now download a personalised  %s installation program."), \config\ConfAssistant::CONSORTIUM['display_name']);
136
+                                echo "<div id='sb_download_message'><p>".sprintf(_("You can now download a personalised  %s installation program."), \config\ConfAssistant::CONSORTIUM['display_name']);
137 137
 //                       echo sprintf(_("The installation program is <span class='emph'>strictly personal</span>, to be used <span class='emph'>only on this device (%s)</span>, and it is <span class='emph'>not permitted to share</span> this information with anyone."), $statusInfo['OS']['display']);
138 138
                                 echo sprintf(_("The installation program is <span class='emph'>strictly personal</span>, to be used <span class='emph'>only on this device (%s)</span>, and it is <span class='emph'>not permitted to share</span> this information with anyone."), $statusInfo['OS']['display']);
139
-                                echo "<p style='color:red;'>" . sprintf(_("When the system detects abuse such as sharing login data with others, all access rights for you will be revoked and you may be sanctioned by your local %s administrator."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>";
140
-                                echo "<p>" . _("During the installation process, you will be asked for the following import PIN. This only happens once during the installation. You do not have to write down this PIN.") . "</p></div>";
139
+                                echo "<p style='color:red;'>".sprintf(_("When the system detects abuse such as sharing login data with others, all access rights for you will be revoked and you may be sanctioned by your local %s administrator."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p>";
140
+                                echo "<p>"._("During the installation process, you will be asked for the following import PIN. This only happens once during the installation. You do not have to write down this PIN.")."</p></div>";
141 141
 
142 142
                                 $importPassword = \core\common\Entity::randomString(4, "0123456789");
143 143
                                 $profile = new \core\ProfileSilverbullet($statusInfo['profile']->identifier, NULL);
144 144
                                 
145
-                                echo "<h2>" . sprintf(_("Import PIN: %s"), $importPassword) . "</h2>";
145
+                                echo "<h2>".sprintf(_("Import PIN: %s"), $importPassword)."</h2>";
146 146
                                 $_SESSION['individualtoken'] = $cleanToken;
147 147
                                 $_SESSION['importpassword'] = $importPassword;
148
-                                echo "<input type='hidden' name='device' value='" . $statusInfo['OS']['device'] . "'/>";
148
+                                echo "<input type='hidden' name='device' value='".$statusInfo['OS']['device']."'/>";
149 149
                                 echo "<input type='hidden' name='generatedfor' value='silverbullet'/>";
150
-                                echo "<button class='large_button' id='user_button_sb' style='height:80px;'><span id='user_buttonnnn'>" . sprintf(_("Click here to download your %s installer!"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</span></button>";
150
+                                echo "<button class='large_button' id='user_button_sb' style='height:80px;'><span id='user_buttonnnn'>".sprintf(_("Click here to download your %s installer!"), \config\ConfAssistant::CONSORTIUM['display_name'])."</span></button>";
151 151
                                 echo "<div class='device_info' id='info_g_sb'></div>";
152 152
                                 break;
153 153
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_EXPIRED:
154 154
                                 echo "<h2>Invitation link expired</h2>";
155
-                                echo "<p>" . sprintf(_("Unfortunately, the invitation link you just used is too old. The %s sign-up invitation was valid until %s. You cannot use this link any more. Please ask your administrator to issue you a new invitation link."), \config\ConfAssistant::CONSORTIUM['display_name'], $statusInfo['invitation_object']->expiry) . "</p>";
155
+                                echo "<p>".sprintf(_("Unfortunately, the invitation link you just used is too old. The %s sign-up invitation was valid until %s. You cannot use this link any more. Please ask your administrator to issue you a new invitation link."), \config\ConfAssistant::CONSORTIUM['display_name'], $statusInfo['invitation_object']->expiry)."</p>";
156 156
                                 echo "<p>Below is all the information about your account's other login details, if any.</p>";
157 157
 // do NOT break, display full account info instead (this was a previously valid token after all)
158 158
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_REDEEMED:
159 159
                                 // nothing to say really. User got the breakdown of certs above, and this link doesn't give him any new ones.
160 160
                                 break;
161 161
                             case \core\SilverbulletInvitation::SB_TOKENSTATUS_INVALID:
162
-                                echo "<h2>" . _("Account information not found") . "</h2>";
163
-                                echo "<p>" . sprintf(_("The invitation link you followed does not map to any invititation we have on file.") . "</p><p>" . _("You should use the exact link you got during sign-up to come here. Alternatively, if you have a valid %s credential already, you can visit this page and Accept the question about logging in with a client certificate (select a certificate with a name ending in '…%s')."),\config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::SILVERBULLET['realm_suffix']);
162
+                                echo "<h2>"._("Account information not found")."</h2>";
163
+                                echo "<p>".sprintf(_("The invitation link you followed does not map to any invititation we have on file.")."</p><p>"._("You should use the exact link you got during sign-up to come here. Alternatively, if you have a valid %s credential already, you can visit this page and Accept the question about logging in with a client certificate (select a certificate with a name ending in '…%s')."), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::SILVERBULLET['realm_suffix']);
164 164
                         }
165 165
                         if (isset($statusInfo['profile_id']) && isset($statusInfo['idp_id'])) {
166
-                            echo "<input type='hidden' name='profile' id='profile_id' value='" . $statusInfo['profile_id'] . "'/>";
167
-                            echo "<input type='hidden' id='inst_id' name='idp' value='" . $statusInfo['idp_id'] . "'/>";
166
+                            echo "<input type='hidden' name='profile' id='profile_id' value='".$statusInfo['profile_id']."'/>";
167
+                            echo "<input type='hidden' id='inst_id' name='idp' value='".$statusInfo['idp_id']."'/>";
168 168
                         }
169 169
                         ?>
170 170
                     </div>
@@ -184,18 +184,18 @@  discard block
 block discarded – undo
184 184
     $attributes = $statusInfo['attributes'];
185 185
     $supportInfo = '';
186 186
     if (!empty($attributes['local_url'])) {
187
-        $supportInfo .= '<tr><td>' . ("WWW:") . '</td><td><a href="' . $attributes['local_url'] . '" target="_blank">' . $attributes['local_url'] . '</a></td></tr>';
187
+        $supportInfo .= '<tr><td>'.("WWW:").'</td><td><a href="'.$attributes['local_url'].'" target="_blank">'.$attributes['local_url'].'</a></td></tr>';
188 188
     }
189 189
     if (!empty($attributes['local_email'])) {
190
-        $supportInfo .= '<tr><td>' . ("email:") . '</td><td><a href="' . $attributes['local_email'] . '" target="_blank">' . $attributes['local_email'] . '</a></td></tr>';
190
+        $supportInfo .= '<tr><td>'.("email:").'</td><td><a href="'.$attributes['local_email'].'" target="_blank">'.$attributes['local_email'].'</a></td></tr>';
191 191
     }
192 192
     if (!empty($attributes['local_phone'])) {
193
-        $supportInfo .= '<tr><td>' . ("tel:") . '</td><td><a href="' . $attributes['local_phone'] . '" target="_blank">' . $attributes['local_phone'] . '</a></td></tr>';
193
+        $supportInfo .= '<tr><td>'.("tel:").'</td><td><a href="'.$attributes['local_phone'].'" target="_blank">'.$attributes['local_phone'].'</a></td></tr>';
194 194
     }
195 195
     if ($supportInfo != '') {
196
-        $supportInfo = "<table><tr><th colspan='2'>" . _("If you encounter problems, then you can obtain direct assistance from your organisation at:") . "</th></tr>$supportInfo</table>";
196
+        $supportInfo = "<table><tr><th colspan='2'>"._("If you encounter problems, then you can obtain direct assistance from your organisation at:")."</th></tr>$supportInfo</table>";
197 197
     } else {
198
-        $supportInfo = "<table><tr><th colspan='2'>" . _("If you encounter problems you should ask those who gave you your account for help.") . "</th></tr></table>";
198
+        $supportInfo = "<table><tr><th colspan='2'>"._("If you encounter problems you should ask those who gave you your account for help.")."</th></tr></table>";
199 199
     }
200 200
     ?>
201 201
     <script>
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             var logo = <?php echo $statusInfo['idp_logo']; ?>;
205 205
             var idpId = <?php echo $statusInfo['idp_id']; ?>;
206 206
             <?php
207
-                if($message != '') {
207
+                if ($message != '') {
208 208
                     echo "message = \"$message\";\n";
209 209
                 }
210 210
             ?>
Please login to merge, or discard this patch.
web/lib/admin/API.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -607,8 +607,7 @@
 block discarded – undo
607 607
         $output = json_encode(["result" => "SUCCESS", "details" => $details], JSON_PRETTY_PRINT);
608 608
         if ($output === FALSE) {
609 609
             $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ". json_last_error(). " - ". json_last_error_msg());
610
-        }
611
-        else {
610
+        } else {
612 611
             echo $output;
613 612
         }
614 613
     }
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@
 block discarded – undo
236 236
     const AUXATTRIB_SB_USERNAME = "ATTRIB-MANAGED-USERNAME";
237 237
     const AUXATTRIB_SB_USERID = "ATTRIB-MANAGED-USERID";
238 238
     const AUXATTRIB_SB_CERTSERIAL = "ATTRIB-MANAGED-CERTSERIAL";
239
-	const AUXATTRIB_SB_CERTCN = "ATTRIB-MANAGED-CERTCN";
239
+    const AUXATTRIB_SB_CERTCN = "ATTRIB-MANAGED-CERTCN";
240 240
     const AUXATTRIB_SB_CERTANNOTATION = "ATTRIB-MANAGED-CERTANNOTATION";
241 241
     const AUXATTRIB_SB_EXPIRY = "ATTRIB-MANAGED-EXPIRY"; /* MySQL timestamp format */
242 242
     const AUXATTRIB_TOKEN = "ATTRIB-TOKEN";
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     const ACTIONS = [
250 250
         // Inst-level actions.
251 251
         API::ACTION_NEWINST_BY_REF => [
252
-            "REQ" => [API::AUXATTRIB_EXTERNALID,],
252
+            "REQ" => [API::AUXATTRIB_EXTERNALID, ],
253 253
             "OPT" => [
254 254
                 'general:geo_coordinates',
255 255
                 'general:logo_file',
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
             ],
267 267
         ],
268 268
         API::ACTION_NEWINST => [
269
-            "REQ" => [API::AUXATTRIB_INSTTYPE,], // "IdP", "SP" or "IdPSP"
269
+            "REQ" => [API::AUXATTRIB_INSTTYPE, ], // "IdP", "SP" or "IdPSP"
270 270
             "OPT" => [
271 271
                 'general:instname',
272 272
                 'general:geo_coordinates',
@@ -562,8 +562,8 @@  discard block
 block discarded – undo
562 562
 
563 563
                 case \core\Options::TYPECODE_COORDINATES:
564 564
                     $extension = \core\Options::TYPECODE_TEXT;
565
-                    $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#";
566
-                    $coercedInline["value"][$basename . "-" . $extension] = $oneAttrib['VALUE'];
565
+                    $coercedInline["option"][$basename] = $oneAttrib['NAME']."#";
566
+                    $coercedInline["value"][$basename."-".$extension] = $oneAttrib['VALUE'];
567 567
                     break;
568 568
                 case \core\Options::TYPECODE_TEXT:
569 569
                 // Fall-through: they all get the same treatment.
@@ -573,18 +573,18 @@  discard block
 block discarded – undo
573 573
                 // Fall-through: they all get the same treatment.
574 574
                 case \core\Options::TYPECODE_INTEGER:
575 575
                     $extension = $optionInfo['type'];
576
-                    $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#";
577
-                    $coercedInline["value"][$basename . "-" . $extension] = $oneAttrib['VALUE'];
576
+                    $coercedInline["option"][$basename] = $oneAttrib['NAME']."#";
577
+                    $coercedInline["value"][$basename."-".$extension] = $oneAttrib['VALUE'];
578 578
                     if ($optionInfo['flag'] == "ML") {
579
-                        $coercedInline["value"][$basename . "-lang"] = $oneAttrib['LANG'];
579
+                        $coercedInline["value"][$basename."-lang"] = $oneAttrib['LANG'];
580 580
                     }
581 581
                     break;
582 582
                 case \core\Options::TYPECODE_FILE:
583 583
                     // Binary data is expected in base64 encoding. This is true also for PEM files!
584 584
                     $extension = $optionInfo['type'];
585
-                    $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#";
586
-                    file_put_contents($dir['dir'] . "/" . $basename . "-" . $extension, base64_decode($oneAttrib['VALUE']));
587
-                    $coercedFile["value"]['tmp_name'][$basename . "-" . $extension] = $dir['dir'] . "/" . $basename . "-" . $extension;
585
+                    $coercedInline["option"][$basename] = $oneAttrib['NAME']."#";
586
+                    file_put_contents($dir['dir']."/".$basename."-".$extension, base64_decode($oneAttrib['VALUE']));
587
+                    $coercedFile["value"]['tmp_name'][$basename."-".$extension] = $dir['dir']."/".$basename."-".$extension;
588 588
                     break;
589 589
                 default:
590 590
                     throw new Exception("We don't seem to know this type code!");
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
     public function returnSuccess($details) {
614 614
         $output = json_encode(["result" => "SUCCESS", "details" => $details], JSON_PRETTY_PRINT);
615 615
         if ($output === FALSE) {
616
-            $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ". json_last_error(). " - ". json_last_error_msg());
616
+            $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ".json_last_error()." - ".json_last_error_msg());
617 617
         }
618 618
         else {
619 619
             echo $output;
Please login to merge, or discard this patch.
web/admin/112365365321.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(__DIR__)) . '/config/_config.php';
22
+require_once dirname(dirname(__DIR__)).'/config/_config.php';
23 23
 
24 24
 $uiElements = new web\lib\admin\UIElements();
25 25
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                         // filesystem cleanup
76 76
                     case web\lib\common\FormElements::BUTTON_DELETE:
77 77
                         $i = web\lib\admin\Maintenance::deleteObsoleteTempDirs();
78
-                        echo "<div class='ca-summary'><table>" . $uiElements->boxRemark(sprintf("Deleted %d cache directories.", $i), "Cache deleted") . "</table></div>";
78
+                        echo "<div class='ca-summary'><table>".$uiElements->boxRemark(sprintf("Deleted %d cache directories.", $i), "Cache deleted")."</table></div>";
79 79
                         break;
80 80
                     default:
81 81
                         break;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                     $admin_query = $dbHandle->exec("SELECT SUM(downloads_admin) AS admin, SUM(downloads_user) AS user, SUM(downloads_silverbullet) as silverbullet FROM downloads WHERE device_id = '$index'");
142 142
                     // SELECT -> mysqli_result, not boolean
143 143
                     while ($a = mysqli_fetch_object(/** @scrutinizer ignore-type */ $admin_query)) {
144
-                        echo "<td>" . $device_array['display'] . "</td><td>" . $a->admin . "</td><td>" . $a->user . "</td><td>" . $a->silverbullet . "</td><td>" . sprintf("%s", $a->user + $a->silverbullet) . "</td>";
144
+                        echo "<td>".$device_array['display']."</td><td>".$a->admin."</td><td>".$a->user."</td><td>".$a->silverbullet."</td><td>".sprintf("%s", $a->user + $a->silverbullet)."</td>";
145 145
                         $gross_admin = $gross_admin + $a->admin;
146 146
                         $gross_user = $gross_user + $a->user;
147 147
                         $gross_silverbullet = $gross_silverbullet + $a->silverbullet;
Please login to merge, or discard this patch.
web/admin/overview_sp.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
                         <td>
151 151
                             <?php
152 152
                                 echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . 
153
-                                     "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . 
154
-                                     "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>";
153
+                                        "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . 
154
+                                        "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>";
155 155
                             ?>
156 156
                         </td>
157 157
                     </tr>
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
                         <td>
174 174
                             <?php
175 175
                                 echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] .
176
-                                     "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . 
177
-                                     "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>";
176
+                                        "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . 
177
+                                        "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>";
178 178
                             ?>
179 179
                         </td>
180 180
                     </tr>
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $deco = new \web\lib\admin\PageDecoration();
32 32
 $validator = new \web\lib\common\InputValidation();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 } else {
39 39
     $link = 'http://';
40 40
 }
41
-$link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
41
+$link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
42 42
 $link = htmlspecialchars($link);
43 43
 
44 44
 echo $deco->defaultPagePrelude(sprintf(_("%s: %s Dashboard"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureHotspot));
@@ -99,21 +99,21 @@  discard block
 block discarded – undo
99 99
         <?php
100 100
         if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) {
101 101
             echo "<tr>
102
-                        <td>" . _("Check another realm's reachability") . "</td>
102
+                        <td>" . _("Check another realm's reachability")."</td>
103 103
                         <td><form method='post' action='../diag/action_realmcheck.php?inst_id=$my_inst->identifier' accept-charset='UTF-8'>
104 104
                               <!--<input type='text' name='realm' id='realm'>-->
105 105
                               <input type='hidden' name='comefrom' id='comefrom' value='$link'/>
106
-                              <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
106
+                              <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button>
107 107
                             </form>
108 108
                         </td>
109 109
                     </tr>";
110 110
         }
111 111
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam") { // SW: APPROVED
112 112
             echo "<tr>
113
-                        <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed) . "</td>
113
+                        <td>" . sprintf(_("Check %s server status"), $uiElements->nomenclatureFed)."</td>
114 114
                         <td>
115 115
                            <form action='https://monitor.eduroam.org/mon_direct.php' accept-charset='UTF-8'>
116
-                              <button style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
116
+                              <button style='cursor:pointer;' type='submit'>" . _("Go!")."</button>
117 117
                            </form>
118 118
                         </td>
119 119
                     </tr>";
@@ -124,10 +124,10 @@  discard block
 block discarded – undo
124 124
     <?php
125 125
     $hotspotProfiles = $my_inst->listDeployments();
126 126
     if (count($hotspotProfiles) == 0) { // no profiles yet.
127
-        echo "<h2>" . sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot) . "</h2>";
127
+        echo "<h2>".sprintf(_("There are not yet any known deployments for your %s."), $uiElements->nomenclatureHotspot)."</h2>";
128 128
     }
129 129
     if (count($hotspotProfiles) > 0) { // no profiles yet.
130
-        echo "<h2>" . sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot) . "</h2>";
130
+        echo "<h2>".sprintf(_("Deployments for this %s"), $uiElements->nomenclatureHotspot)."</h2>";
131 131
         // display an info box with the connection data
132 132
     }
133 133
    
@@ -146,19 +146,19 @@  discard block
 block discarded – undo
146 146
         ?>
147 147
         <div style='display: table-row; margin-bottom: 20px;'>
148 148
             <div class='profilebox' style='display: table-cell;'>
149
-                <h2><?php echo core\DeploymentManaged::PRODUCTNAME . " (<span style='color:" . ( $deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>" . _("inactive") : "green;'>" . _("active") ) . "</span>)"; ?></h2>
149
+                <h2><?php echo core\DeploymentManaged::PRODUCTNAME." (<span style='color:".($deploymentObject->status == \core\AbstractDeployment::INACTIVE ? "red;'>"._("inactive") : "green;'>"._("active"))."</span>)"; ?></h2>
150 150
                 <table>
151 151
                     <tr>
152 152
                         <td><strong><?php echo _("Your primary RADIUS server") ?></strong><br/>
153 153
                         <?php
154 154
                             if ($deploymentObject->host1_v4 !== NULL) {
155
-                                echo _("IPv4") . ": " . $deploymentObject->host1_v4;
155
+                                echo _("IPv4").": ".$deploymentObject->host1_v4;
156 156
                             }
157 157
                             if ($deploymentObject->host1_v4 !== NULL && $deploymentObject->host1_v6 !== NULL) {
158 158
                                 echo "<br/>";
159 159
                             }
160 160
                             if ($deploymentObject->host1_v6 !== NULL) {
161
-                                echo _("IPv6") . ": " . $deploymentObject->host1_v6;
161
+                                echo _("IPv6").": ".$deploymentObject->host1_v6;
162 162
                             }
163 163
                             ?>
164 164
                         </td>
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
                         <td><?php echo $deploymentObject->port1; ?></td>
167 167
                         <td>
168 168
                             <?php
169
-                                echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_1]['icon'] . 
170
-                                     "' alt='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . 
171
-                                     "' title='" . $radiusMessages[$deploymentObject->radius_status_1]['text'] . "'>";
169
+                                echo "<img src='".$radiusMessages[$deploymentObject->radius_status_1]['icon']. 
170
+                                     "' alt='".$radiusMessages[$deploymentObject->radius_status_1]['text']. 
171
+                                     "' title='".$radiusMessages[$deploymentObject->radius_status_1]['text']."'>";
172 172
                             ?>
173 173
                         </td>
174 174
                     </tr>
@@ -176,22 +176,22 @@  discard block
 block discarded – undo
176 176
                         <td><strong><?php echo _("Your backup RADIUS server") ?><br/></strong>
177 177
                             <?php
178 178
                             if ($deploymentObject->host2_v4 !== NULL) {
179
-                                echo _("IPv4") . ": " . $deploymentObject->host2_v4;
179
+                                echo _("IPv4").": ".$deploymentObject->host2_v4;
180 180
                             }
181 181
                             if ($deploymentObject->host2_v4 !== NULL && $deploymentObject->host2_v6 !== NULL) {
182 182
                                 echo "<br/>";
183 183
                             }
184 184
                             if ($deploymentObject->host2_v6 !== NULL) {
185
-                                echo _("IPv6") . ": " . $deploymentObject->host2_v6;
185
+                                echo _("IPv6").": ".$deploymentObject->host2_v6;
186 186
                             }
187 187
                             ?></td>
188 188
                         <td><?php echo _("RADIUS port number: ") ?></td>
189 189
                         <td><?php echo $deploymentObject->port2; ?></td>
190 190
                         <td>
191 191
                             <?php
192
-                                echo "<img src='" . $radiusMessages[$deploymentObject->radius_status_2]['icon'] .
193
-                                     "' alt='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . 
194
-                                     "' title='" . $radiusMessages[$deploymentObject->radius_status_2]['text'] . "'>";
192
+                                echo "<img src='".$radiusMessages[$deploymentObject->radius_status_2]['icon'].
193
+                                     "' alt='".$radiusMessages[$deploymentObject->radius_status_2]['text']. 
194
+                                     "' title='".$radiusMessages[$deploymentObject->radius_status_2]['text']."'>";
195 195
                             ?>
196 196
                         </td>
197 197
                     </tr>
@@ -242,12 +242,12 @@  discard block
 block discarded – undo
242 242
                                     if (isset($res['FAILURE']) && $res['FAILURE'] > 0) {
243 243
                                         echo '<br>';
244 244
                                         if ($res['FAILURE'] == 2) {
245
-                                            echo ' <span style="color: red;">' . _("Activation failure.") . '</span>';
245
+                                            echo ' <span style="color: red;">'._("Activation failure.").'</span>';
246 246
                                         } else {
247 247
                                             if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') {
248
-                                                echo ' <span style="color: red;">' . _("Activation failure for your primary RADIUS server.") . '</span>';
248
+                                                echo ' <span style="color: red;">'._("Activation failure for your primary RADIUS server.").'</span>';
249 249
                                             } else {
250
-                                                echo ' <span style="color: red;">' . _("Activation failure for your backup RADIUS server.") . '</span>';
250
+                                                echo ' <span style="color: red;">'._("Activation failure for your backup RADIUS server.").'</span>';
251 251
                                             }
252 252
                                         }
253 253
                                     }
@@ -267,12 +267,12 @@  discard block
 block discarded – undo
267 267
                                     if ($res['FAILURE'] > 0) {
268 268
                                         echo '<br>';
269 269
                                         if ($res['FAILURE'] == 2) {
270
-                                            echo ' <span style="color: red;">' . _("Failure during deactivation, your request is queued for handling") . '</span>';
270
+                                            echo ' <span style="color: red;">'._("Failure during deactivation, your request is queued for handling").'</span>';
271 271
                                         } else {
272 272
                                             if (isset($_GET['res'][1]) && $_GET['res']['1'] == 'FAILURE') {
273
-                                                echo ' <span style="color: red;">' . _("Deactivation failure for your primary RADIUS server, your request is queued.") . '</span>';
273
+                                                echo ' <span style="color: red;">'._("Deactivation failure for your primary RADIUS server, your request is queued.").'</span>';
274 274
                                             } else {
275
-                                                echo ' <span style="color: red;">' . _("Deactivation failure for your backup RADIUS server, your request is queued.") . '</span>';
275
+                                                echo ' <span style="color: red;">'._("Deactivation failure for your backup RADIUS server, your request is queued.").'</span>';
276 276
                                             }
277 277
                                         }
278 278
                                     }
Please login to merge, or discard this patch.
utils/SP_consistency_check.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 require_once dirname(dirname(__FILE__)) . "/config/_config.php";
3 3
 /**
4
-    * check if URL responds with 200
5
-    *
6
-    * @param string $srv server name
7
-    * @return integer or NULL
4
+ * check if URL responds with 200
5
+ *
6
+ * @param string $srv server name
7
+ * @return integer or NULL
8 8
 */
9 9
 function checkConfigRADIUSDaemon ($srv) {
10 10
     $ch = curl_init();
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
2
+require_once dirname(dirname(__FILE__))."/config/_config.php";
3 3
 /**
4 4
     * check if URL responds with 200
5 5
     *
6 6
     * @param string $srv server name
7 7
     * @return integer or NULL
8 8
 */
9
-function checkConfigRADIUSDaemon ($srv) {
9
+function checkConfigRADIUSDaemon($srv) {
10 10
     $ch = curl_init();
11 11
     if ($ch === FALSE) {
12 12
         return NULL;
13 13
     }
14 14
     $timeout = 10;
15
-    curl_setopt ( $ch, CURLOPT_URL, $srv );
16
-    curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
17
-    curl_setopt ( $ch, CURLOPT_TIMEOUT, $timeout );
15
+    curl_setopt($ch, CURLOPT_URL, $srv);
16
+    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
17
+    curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
18 18
     curl_exec($ch);
19
-    $http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
19
+    $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
20 20
     if ($http_code == 200) {
21 21
         return 1;
22 22
     }
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 }
53 53
 $siteStatus = array();
54 54
 foreach (array_keys($brokenDeployments) as $server_id) {
55
-    print "check $server_id " . $radiusSite[$server_id] . "\n";
56
-    $siteStatus[$server_id]  = checkConfigRADIUSDaemon('http://' . $radiusSite[$server_id]);
55
+    print "check $server_id ".$radiusSite[$server_id]."\n";
56
+    $siteStatus[$server_id] = checkConfigRADIUSDaemon('http://'.$radiusSite[$server_id]);
57 57
     if ($siteStatus[$server_id]) {
58 58
         echo "\ncheck radius\n";
59 59
         echo \config\Diagnostics::RADIUSSPTEST['port']."\n";
Please login to merge, or discard this patch.
web/admin/inc/userStats.inc.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * ******************************************************************************
10 10
  */
11 11
 
12
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
12
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
13 13
 
14 14
 $auth = new \web\lib\admin\Authentication();
15 15
 $auth->authenticate();
@@ -22,30 +22,30 @@  discard block
 block discarded – undo
22 22
 
23 23
 ?>
24 24
 
25
-<h1><?php echo _("User Authentication Records");?></h1>
26
-<p><?php echo _("Note that:");?></p>
25
+<h1><?php echo _("User Authentication Records"); ?></h1>
26
+<p><?php echo _("Note that:"); ?></p>
27 27
 <ul>
28
-    <li><?php echo _("Authentication records are deleted after six months retention time");?></li>
29
-    <li><?php echo _("Operator Domain is based on the RADIUS attribute 'Operator-Name' and not sent by all hotspots");?></li>
30
-    <li><?php echo _("Different MAC addresses per credential may be due to MAC Address randomisation in recent operating systems");?></li>
28
+    <li><?php echo _("Authentication records are deleted after six months retention time"); ?></li>
29
+    <li><?php echo _("Operator Domain is based on the RADIUS attribute 'Operator-Name' and not sent by all hotspots"); ?></li>
30
+    <li><?php echo _("Different MAC addresses per credential may be due to MAC Address randomisation in recent operating systems"); ?></li>
31 31
 </ul>
32 32
 <table class='authrecord'>
33 33
     <tr>
34
-        <td><strong><?php echo _("Timestamp");?></strong></td>
35
-        <td><strong><?php echo _("Credential");?></strong></td>
36
-        <td><strong><?php echo _("MAC Address");?></strong></td>
37
-        <td><strong><?php echo _("Result");?></strong></td>
38
-        <td><strong><?php echo _("Operator Domain");?></strong></td>
34
+        <td><strong><?php echo _("Timestamp"); ?></strong></td>
35
+        <td><strong><?php echo _("Credential"); ?></strong></td>
36
+        <td><strong><?php echo _("MAC Address"); ?></strong></td>
37
+        <td><strong><?php echo _("Result"); ?></strong></td>
38
+        <td><strong><?php echo _("Operator Domain"); ?></strong></td>
39 39
     </tr>
40 40
     <?php
41 41
     $userAuthData = $profile->getUserAuthRecords($userInt);
42 42
     foreach ($userAuthData as $oneRecord) {
43
-        echo "<tr class='".($oneRecord['RESULT'] == "Access-Accept" ? "auth-success" : "auth-fail" )."'>"
43
+        echo "<tr class='".($oneRecord['RESULT'] == "Access-Accept" ? "auth-success" : "auth-fail")."'>"
44 44
                 . "<td>".$oneRecord['TIMESTAMP']."</td>"
45
-                . "<td>".substr_replace($oneRecord['CN'], "@…", strpos($oneRecord['CN'],"@"))."</td>"
45
+                . "<td>".substr_replace($oneRecord['CN'], "@…", strpos($oneRecord['CN'], "@"))."</td>"
46 46
                 . "<td>".$oneRecord['MAC']."</td>"
47 47
                 . "<td>".($oneRecord['RESULT'] == "Access-Accept" ? _("Success") : _("Failure"))."</td>"
48
-                . "<td>".substr($oneRecord['OPERATOR'] ?? "1(unknown)",1)."</td>"
48
+                . "<td>".substr($oneRecord['OPERATOR'] ?? "1(unknown)", 1)."</td>"
49 49
                 . "</tr>";
50 50
     }
51 51
     ?>
Please login to merge, or discard this patch.
core/UserAPI.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $this->installerPath = $cache['path'];
84 84
         if ($this->installerPath !== NULL && $token === NULL && $password === NULL) {
85 85
             $this->loggerInstance->debug(4, "Using cached installer for: $device\n");
86
-            $installerProperties['link'] = "API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=$profileId&device=$device&generatedfor=$generatedFor";
86
+            $installerProperties['link'] = "API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=$profileId&device=$device&generatedfor=$generatedFor";
87 87
             $installerProperties['mime'] = $cache['mime'];
88 88
         } else {
89 89
             $myInstaller = $this->generateNewInstaller($device, $profile, $generatedFor, $token, $password);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             $this->loggerInstance->debug(5, "generateNewInstaller() - Device setup done");
172 172
             $installer = $dev->writeInstaller();
173 173
             $this->loggerInstance->debug(5, "generateNewInstaller() - writeInstaller complete");
174
-            $iPath = $dev->FPATH . '/tmp/' . $installer;
174
+            $iPath = $dev->FPATH.'/tmp/'.$installer;
175 175
             if ($iPath && is_file($iPath)) {
176 176
                 if (isset($dev->options['mime'])) {
177 177
                     $out['mime'] = $dev->options['mime'];
@@ -179,17 +179,17 @@  discard block
 block discarded – undo
179 179
                     $info = new \finfo();
180 180
                     $out['mime'] = $info->file($iPath, FILEINFO_MIME_TYPE);
181 181
                 }
182
-                $this->installerPath = $dev->FPATH . '/' . $installer;
182
+                $this->installerPath = $dev->FPATH.'/'.$installer;
183 183
                 rename($iPath, $this->installerPath);
184 184
                 $integerEap = (new \core\common\EAP($dev->selectedEap))->getIntegerRep();
185 185
                 $profile->updateCache($device, $this->installerPath, $out['mime'], $integerEap);
186 186
                 if (\config\Master::DEBUG_LEVEL < 4) {
187
-                    \core\common\Entity::rrmdir($dev->FPATH . '/tmp');
187
+                    \core\common\Entity::rrmdir($dev->FPATH.'/tmp');
188 188
                 }
189
-                $this->loggerInstance->debug(4, "Generated installer: " . $this->installerPath . ": for: $device, EAP:" . $integerEap . "\n");
190
-                $out['link'] = "API.php?action=downloadInstaller&lang=" . $this->languageInstance->getLang() . "&profile=" . $profile->identifier . "&device=$device&generatedfor=$generatedFor";
189
+                $this->loggerInstance->debug(4, "Generated installer: ".$this->installerPath.": for: $device, EAP:".$integerEap."\n");
190
+                $out['link'] = "API.php?action=downloadInstaller&lang=".$this->languageInstance->getLang()."&profile=".$profile->identifier."&device=$device&generatedfor=$generatedFor";
191 191
             } else {
192
-                $this->loggerInstance->debug(2, "Installer generation failed for: " . $profile->identifier . ":$device:" . $this->languageInstance->getLang() . "\n");
192
+                $this->loggerInstance->debug(2, "Installer generation failed for: ".$profile->identifier.":$device:".$this->languageInstance->getLang()."\n");
193 193
                 $out['link'] = 0;
194 194
             }
195 195
         }
@@ -302,13 +302,13 @@  discard block
 block discarded – undo
302 302
         $file = $this->installerPath;
303 303
         $filetype = $output['mime'];
304 304
         $this->loggerInstance->debug(4, "installer MIME type:$filetype\n");
305
-        header("Content-type: " . $filetype);
305
+        header("Content-type: ".$filetype);
306 306
         if ($filetype !== "application/x-wifi-config") { // for those installers to work on Android, Content-Disposition MUST NOT be set
307
-            header('Content-Disposition: inline; filename="' . basename($file) . '"');
307
+            header('Content-Disposition: inline; filename="'.basename($file).'"');
308 308
         } else {
309 309
             header('Content-Transfer-Encoding: base64');
310 310
         }
311
-        header('Content-Length: ' . filesize($file));
311
+        header('Content-Length: '.filesize($file));
312 312
         ob_clean();
313 313
         flush();
314 314
         readfile($file);
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
         $filetype = $info->buffer($inputImage, FILEINFO_MIME_TYPE);
330 330
         $offset = 60 * 60 * 24 * 30;
331 331
         // gmdate cannot fail here - time() is its default argument (and integer), and we are adding an integer to it
332
-        $expiresString = "Expires: " . /** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
332
+        $expiresString = "Expires: "./** @scrutinizer ignore-type */ gmdate("D, d M Y H:i:s", time() + $offset)." GMT";
333 333
         $blob = $inputImage;
334 334
 
335 335
         if ($resize === TRUE) {
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
         $filetype = 'image/png'; // default, only one code path where it can become different
385 385
         list($width, $height, $resize) = $this->testForResize($widthIn, $heightIn);
386 386
         if ($resize) {
387
-            $logoFile = ROOT . '/web/downloads/logos/' . $identifier . '_' . $width . '_' . $height . '.png';
387
+            $logoFile = ROOT.'/web/downloads/logos/'.$identifier.'_'.$width.'_'.$height.'.png';
388 388
         }
389 389
         if (is_file($logoFile)) { // $logoFile could be an empty string but then we will get a FALSE
390 390
             $this->loggerInstance->debug(4, "Using cached logo $logoFile for: $identifier\n");
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
             if (!isset($device['match'])) {
478 478
                 continue;
479 479
             }
480
-            if (preg_match('/' . $device['match'] . '/', $browser)) {
480
+            if (preg_match('/'.$device['match'].'/', $browser)) {
481 481
                 return $this->returnDevice($devId, $device);
482 482
             }
483 483
         }
Please login to merge, or discard this patch.