Passed
Push — master ( 0682fa...e35183 )
by Maja
13:58
created
web/admin/overview_certificates.php 1 patch
Spacing   +2 added lines, -2 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
 $auth = new \web\lib\admin\Authentication();
32 32
 $deco = new \web\lib\admin\PageDecoration();
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         foreach ($theFed->listTlsCertificates() as $oneCert) { // fetch list a second time, in case we got a cert
82 82
             $status = $oneCert['STATUS'];
83 83
             if ($status == "ISSUED") {
84
-                $status = "<span onclick='alert(\"".str_replace("\n","\\n",$oneCert['CERT'])."\");'>$status</span>";
84
+                $status = "<span onclick='alert(\"".str_replace("\n", "\\n", $oneCert['CERT'])."\");'>$status</span>";
85 85
             }
86 86
             echo "<tr><td>".$oneCert['REQSERIAL']."</td><td>".$oneCert['DN']."</td><td>".$status."</td><td>".$oneCert['EXPIRY']."</td></tr>";
87 87
         }
Please login to merge, or discard this patch.
devices/ms/DeviceW8W10.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@
 block discarded – undo
35 35
  * @author Tomasz Wolniewicz <[email protected]>
36 36
  * @package ModuleWriting
37 37
  */
38
- class DeviceW8W10 extends WindowsCommon 
39
- {
38
+    class DeviceW8W10 extends WindowsCommon 
39
+    {
40 40
     final public function __construct() {
41 41
         parent::__construct();
42 42
         \core\common\Entity::intoThePotatoes();
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             foreach ($this->attributes['internal:consortia'] as $oneCons) {
98 98
                 $knownOiName = array_search($oneCons, \config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']);
99 99
                 if ($knownOiName === FALSE) { // a custom RCOI as set by the IdP admin; do not use the term "eduroam" in that one!
100
-                    $knownOiName = $this->attributes['general:instname'][0] . " "._("Roaming Partner") . " $roamingPartner";
100
+                    $knownOiName = $this->attributes['general:instname'][0]." "._("Roaming Partner")." $roamingPartner";
101 101
                     $roamingPartner++;
102 102
                 }
103 103
                 $ssid = 'cat-passpoint-profile';
@@ -149,12 +149,12 @@  discard block
 block discarded – undo
149 149
         if (empty($this->attributes['internal:realm'][0])) {
150 150
             $retval .= \config\ConfAssistant::CONSORTIUM['interworking-domainname-fallback'];
151 151
         } else {
152
-            $retval .=  $this->attributes['internal:realm'][0];
152
+            $retval .= $this->attributes['internal:realm'][0];
153 153
         }
154 154
         $retval .= '</DomainName>';
155
-        $retval .= '<RoamingConsortium><OUI>' . $oi .
155
+        $retval .= '<RoamingConsortium><OUI>'.$oi.
156 156
             '</OUI></RoamingConsortium>';
157
-        $retval .=  '</Hotspot2>';
157
+        $retval .= '</Hotspot2>';
158 158
         return($retval);
159 159
     }
160 160
     
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
         $profileFileCont = '<EAPConfig><EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
164 164
 <EapMethod>
165 165
 ';
166
-        $profileFileCont .= '<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">' .
167
-                $this->selectedEap["OUTER"] . '</Type>
166
+        $profileFileCont .= '<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">'.
167
+                $this->selectedEap["OUTER"].'</Type>
168 168
 <VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId>
169 169
 <VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType>
170
-<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId . '</AuthorId>
170
+<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId.'</AuthorId>
171 171
 </EapMethod>
172 172
 ';
173 173
         return($profileFileCont);
@@ -178,10 +178,10 @@  discard block
 block discarded – undo
178 178
 <eapTls:ServerValidation>
179 179
 <eapTls:DisableUserPromptForServerValidation>true</eapTls:DisableUserPromptForServerValidation>
180 180
 ';
181
-        $profileFileCont .= '<eapTls:ServerNames>' . $this->servers . '</eapTls:ServerNames>';
181
+        $profileFileCont .= '<eapTls:ServerNames>'.$this->servers.'</eapTls:ServerNames>';
182 182
         foreach ($this->caArray as $certAuthority) {
183 183
             if ($certAuthority['root']) {
184
-                $profileFileCont .= "<eapTls:TrustedRootCA>" . $certAuthority['sha1'] . "</eapTls:TrustedRootCA>\n";
184
+                $profileFileCont .= "<eapTls:TrustedRootCA>".$certAuthority['sha1']."</eapTls:TrustedRootCA>\n";
185 185
             }
186 186
         }
187 187
         $profileFileCont .= '</eapTls:ServerValidation>
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
         $profileFileCont = '
194 194
         <ServerValidation>
195 195
 ';
196
-        $profileFileCont .= '<ServerNames>' . $this->servers . '</ServerNames> ';
196
+        $profileFileCont .= '<ServerNames>'.$this->servers.'</ServerNames> ';
197 197
         foreach ($this->caArray as $certAuthority) {
198 198
             if ($certAuthority['root']) {
199
-                $profileFileCont .= "<TrustedRootCAHash>" . chunk_split($certAuthority['sha1'], 2, ' ') . "</TrustedRootCAHash>\n";
199
+                $profileFileCont .= "<TrustedRootCAHash>".chunk_split($certAuthority['sha1'], 2, ' ')."</TrustedRootCAHash>\n";
200 200
             }
201 201
         }
202 202
         $profileFileCont .= '<DisablePrompt>true</DisablePrompt>
@@ -228,10 +228,10 @@  discard block
 block discarded – undo
228 228
         $profileFileCont = '
229 229
         <ServerValidation>
230 230
 <DisableUserPromptForServerValidation>true</DisableUserPromptForServerValidation>
231
-<ServerNames>' . $this->servers . '</ServerNames>';
231
+<ServerNames>' . $this->servers.'</ServerNames>';
232 232
         foreach ($this->caArray as $certAuthority) {
233 233
             if ($certAuthority['root']) {
234
-                $profileFileCont .= "<TrustedRootCA>" . $certAuthority['sha1'] . "</TrustedRootCA>\n";
234
+                $profileFileCont .= "<TrustedRootCA>".$certAuthority['sha1']."</TrustedRootCA>\n";
235 235
             }
236 236
         }
237 237
         $profileFileCont .= '</ServerValidation>
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
         if ($this->useAnon) {
288 288
             $profileFileCont .= '<IdentityPrivacy>true</IdentityPrivacy>
289 289
 ';
290
-            $profileFileCont .= '<AnonymousIdentity>' . $this->outerId . '</AnonymousIdentity>
290
+            $profileFileCont .= '<AnonymousIdentity>'.$this->outerId.'</AnonymousIdentity>
291 291
                 ';
292 292
         } else {
293 293
             $profileFileCont .= '<IdentityPrivacy>false</IdentityPrivacy>
@@ -304,10 +304,10 @@  discard block
 block discarded – undo
304 304
         $profileFileCont = '
305 305
 <Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig">
306 306
 <EAPIdentityProviderList xmlns="urn:ietf:params:xml:ns:yang:ietf-eap-metadata">
307
-<EAPIdentityProvider ID="' . $this->deviceUUID . '" namespace="urn:UUID">
307
+<EAPIdentityProvider ID="' . $this->deviceUUID.'" namespace="urn:UUID">
308 308
 
309 309
 <ProviderInfo>
310
-<DisplayName>' . $this->translateString($this->attributes['general:instname'][0], $this->codePage) . '</DisplayName>
310
+<DisplayName>' . $this->translateString($this->attributes['general:instname'][0], $this->codePage).'</DisplayName>
311 311
 </ProviderInfo>
312 312
 <AuthenticationMethods>
313 313
 <AuthenticationMethod>
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
             if ($this->outerUser == '') {
320 320
                 $profileFileCont .= '<AnonymousIdentity>@</AnonymousIdentity>';
321 321
             } else {
322
-                $profileFileCont .= '<AnonymousIdentity>' . $this->outerId . '</AnonymousIdentity>';
322
+                $profileFileCont .= '<AnonymousIdentity>'.$this->outerId.'</AnonymousIdentity>';
323 323
             }
324 324
         }
325 325
         $profileFileCont .= '</ClientSideCredential>
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
         $profileFileCont .= $this->glTtlsServerValidation();
328 328
         $profileFileCont .= '
329 329
 <InnerAuthenticationMethod>
330
-<NonEAPAuthMethod>' . \core\common\EAP::eapDisplayName($this->selectedEap)['INNER'] . '</NonEAPAuthMethod>
330
+<NonEAPAuthMethod>' . \core\common\EAP::eapDisplayName($this->selectedEap)['INNER'].'</NonEAPAuthMethod>
331 331
 </InnerAuthenticationMethod>
332 332
 <VendorSpecific>
333 333
 <SessionResumption>false</SessionResumption>
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 <UseWinLogonCredentials>false</UseWinLogonCredentials>
359 359
 </EapType>
360 360
 </Eap>
361
-<EnableQuarantineChecks>' . $nea . '</EnableQuarantineChecks>
361
+<EnableQuarantineChecks>' . $nea.'</EnableQuarantineChecks>
362 362
 <RequireCryptoBinding>false</RequireCryptoBinding>
363 363
 ';
364 364
         if ($this->useAnon) {
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                 $profileFileCont .= '<AnonymousUserName/>
371 371
 ';
372 372
             } else {
373
-                $profileFileCont .= '<AnonymousUserName>' . $this->outerUser . '</AnonymousUserName>
373
+                $profileFileCont .= '<AnonymousUserName>'.$this->outerUser.'</AnonymousUserName>
374 374
                 ';
375 375
             }
376 376
             $profileFileCont .= '</IdentityPrivacy>
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
     private function prepareEapConfig() {
401 401
         if ($this->useAnon) {
402 402
             $this->outerUser = $this->attributes['internal:anon_local_value'][0];
403
-            $this->outerId = $this->outerUser . '@' . $this->attributes['internal:realm'][0];
403
+            $this->outerId = $this->outerUser.'@'.$this->attributes['internal:realm'][0];
404 404
         }
405 405
 
406 406
         $profileFileCont = $this->eapConfigHeader();
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
             default:
426 426
                 break;
427 427
         }
428
-        return(['win' => $profileFileCont . '</EapHostConfig></EAPConfig>']);
428
+        return(['win' => $profileFileCont.'</EapHostConfig></EAPConfig>']);
429 429
     }
430 430
 
431 431
     /**
@@ -443,10 +443,10 @@  discard block
 block discarded – undo
443 443
     private function writeWLANprofile($wlanProfileName, $ssid, $auth, $encryption, $eapConfig, $profileNumber, $oi = '') {
444 444
         $profileFileCont = '<?xml version="1.0"?>
445 445
 <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
446
-<name>' . $wlanProfileName . '</name>
446
+<name>' . $wlanProfileName.'</name>
447 447
 <SSIDConfig>
448 448
 <SSID>
449
-<name>' . $ssid . '</name>
449
+<name>' . $ssid.'</name>
450 450
 </SSID>
451 451
 <nonBroadcast>true</nonBroadcast>
452 452
 </SSIDConfig>';
@@ -458,8 +458,8 @@  discard block
 block discarded – undo
458 458
 <MSM>
459 459
 <security>
460 460
 <authEncryption>
461
-<authentication>' . $auth . '</authentication>
462
-<encryption>' . $encryption . '</encryption>
461
+<authentication>' . $auth.'</authentication>
462
+<encryption>' . $encryption.'</encryption>
463 463
 <useOneX>true</useOneX>
464 464
 </authEncryption>
465 465
 ';
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
             mkdir('w8');
487 487
         }
488 488
         $xmlFname = "w8/wlan_prof-$profileNumber.xml";
489
-        file_put_contents($xmlFname, $profileFileCont . $eapConfig['win'] . $closing);
489
+        file_put_contents($xmlFname, $profileFileCont.$eapConfig['win'].$closing);
490 490
         $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n");
491 491
         $hs20 = $oi == '' ? 0 : 1;
492 492
         return("\"$wlanProfileName\" \"$encryption\" $hs20");
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
             mkdir('w8');
515 515
         }
516 516
         $xmlFname = "w8/lan_prof.xml";
517
-        file_put_contents($xmlFname, $profileFileCont . $eapConfig['win'] . $closing);
517
+        file_put_contents($xmlFname, $profileFileCont.$eapConfig['win'].$closing);
518 518
         $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n");
519 519
     }
520 520
 
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
         }
536 536
         foreach ($caArray as $certAuthority) {
537 537
             $store = $certAuthority['root'] ? "root" : "ca";
538
-            $fcontentsCerts .= '!insertmacro install_ca_cert "' . $certAuthority['file'] . '" "' . $certAuthority['sha1'] . '" "' . $store . "\"\n";
538
+            $fcontentsCerts .= '!insertmacro install_ca_cert "'.$certAuthority['file'].'" "'.$certAuthority['sha1'].'" "'.$store."\"\n";
539 539
         }
540 540
         fwrite($fileHandleCerts, $fcontentsCerts);
541 541
         fclose($fileHandleCerts);
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
     private function writeMainNSH($eap, $attr) {
545 545
         $this->loggerInstance->debug(4, "writeMainNSH");
546 546
         $this->loggerInstance->debug(4, $attr);
547
-        $this->loggerInstance->debug(4, "Device_id = " . $this->device_id . "\n");
547
+        $this->loggerInstance->debug(4, "Device_id = ".$this->device_id."\n");
548 548
         $fcontents = "!define W8\n";
549 549
         if ($this->device_id == 'w10') {
550 550
             $fcontents .= "!define W10\n";
@@ -574,8 +574,8 @@  discard block
 block discarded – undo
574 574
         if ($eap == \core\common\EAP::EAPTYPE_SILVERBULLET) {
575 575
             $fcontents .= "!define SILVERBULLET\n";
576 576
         }
577
-        $fcontents .= '!define ' . $eapStr;
578
-        $fcontents .= "\n" . '!define EXECLEVEL "' . $execLevel . '"';
577
+        $fcontents .= '!define '.$eapStr;
578
+        $fcontents .= "\n".'!define EXECLEVEL "'.$execLevel.'"';
579 579
         $fcontents .= $this->writeNsisDefines($attr);
580 580
         file_put_contents('main.nsh', $fcontents);
581 581
     }
Please login to merge, or discard this patch.
devices/apple_mobileconfig/MobileconfigSuperclass.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -774,7 +774,7 @@
 block discarded – undo
774 774
                             \core\common\Entity::$nomenclature_inst, 
775 775
                             count($this->CAsAccountedFor)+1, 
776 776
                             ($ca['root'] ? _("Root") : _("Intermediate"))) . 
777
-              "</string>
777
+                "</string>
778 778
                <key>PayloadIdentifier</key>
779 779
                <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
780 780
                <key>PayloadOrganization</key>
Please login to merge, or discard this patch.
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -179,15 +179,15 @@  discard block
 block discarded – undo
179 179
       <key>PayloadDescription</key>
180 180
          <string>$tagline</string>
181 181
       <key>PayloadDisplayName</key>
182
-         <string>" . \config\ConfAssistant::CONSORTIUM['display_name'] . "</string>
182
+         <string>".\config\ConfAssistant::CONSORTIUM['display_name']."</string>
183 183
       <key>PayloadIdentifier</key>
184
-         <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string>
184
+         <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string>
185 185
       <key>PayloadOrganization</key>
186
-         <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ( $this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string>
186
+         <string>".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8').($this->attributes['internal:profile_count'][0] > 1 ? " (".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8').")" : "")."</string>
187 187
       <key>PayloadType</key>
188 188
          <string>Configuration</string>
189 189
       <key>PayloadUUID</key>
190
-         <string>" . \core\common\Entity::uuid('', self::IPHONE_PAYLOAD_PREFIX . $this->massagedConsortium . $this->massagedCountry . $this->massagedInst . $this->massagedProfile) . "</string>
190
+         <string>" . \core\common\Entity::uuid('', self::IPHONE_PAYLOAD_PREFIX.$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile)."</string>
191 191
       <key>PayloadVersion</key>
192 192
          <integer>1</integer>";
193 193
         \core\common\Entity::outOfThePotatoes();
@@ -219,16 +219,16 @@  discard block
 block discarded – undo
219 219
     {
220 220
         \core\common\Entity::intoThePotatoes();
221 221
         if (isset($this->attributes['support:info_file'])) {
222
-            return MobileconfigSuperclass::BUFFER_CONSENT_PRE . htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8') . MobileconfigSuperclass::BUFFER_CONSENT_POST;
222
+            return MobileconfigSuperclass::BUFFER_CONSENT_PRE.htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8').MobileconfigSuperclass::BUFFER_CONSENT_POST;
223 223
         }
224 224
         if ($this->attributes['internal:verify_userinput_suffix'][0] != 0) {
225 225
             if (strlen($this->attributes['internal:realm'][0]) > 0) {
226 226
                 /// note space between variable and exclamation mark - makes sure users don't mistakenly think the exclamation mark is part of the required username!
227
-                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username must end with @%s !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST;
227
+                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username must end with @%s !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST;
228 228
                 \core\common\Entity::outOfThePotatoes();
229 229
                 return $retval;
230 230
             }
231
-            $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . _("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.") . MobileconfigSuperclass::BUFFER_CONSENT_POST;
231
+            $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE._("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.").MobileconfigSuperclass::BUFFER_CONSENT_POST;
232 232
             \core\common\Entity::outOfThePotatoes();
233 233
             return $retval;
234 234
         }
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         // also escape htmlspecialchars
252 252
         // not all names and profiles have a name, so be prepared
253 253
 
254
-        $this->loggerInstance->debug(5, "List of available attributes: " . var_export($this->attributes, TRUE));
254
+        $this->loggerInstance->debug(5, "List of available attributes: ".var_export($this->attributes, TRUE));
255 255
 
256 256
         $this->instName = $this->attributes['general:instname'][0] ?? _("Unnamed Organisation");
257 257
         $this->profileName = $this->attributes['profile:name'][0] ?? _("Unnamed Profile");
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 
294 294
         file_put_contents('installer_profile', $outputXml);
295 295
 
296
-        $fileName = $this->installerBasename . '.mobileconfig';
296
+        $fileName = $this->installerBasename.'.mobileconfig';
297 297
 
298 298
         if (!$this->sign) {
299 299
             rename("installer_profile", $fileName);
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
             return $fileName;
302 302
         }
303 303
         // still here? Then we are signing.
304
-        $signing = system($this->sign . " installer_profile '$fileName' > /dev/null");
304
+        $signing = system($this->sign." installer_profile '$fileName' > /dev/null");
305 305
         if ($signing === FALSE) {
306 306
             $this->loggerInstance->debug(2, "Signing the mobileconfig installer $fileName FAILED!\n");
307 307
         }
@@ -320,19 +320,19 @@  discard block
 block discarded – undo
320 320
         \core\common\Entity::intoThePotatoes();
321 321
         $ssidCount = count($this->attributes['internal:SSID']);
322 322
         $certCount = count($this->attributes['internal:CAs'][0]);
323
-        $out = "<p>" . _("For best results, please use the built-in browser (Safari) to open the configuration file.") . "</p>";
323
+        $out = "<p>"._("For best results, please use the built-in browser (Safari) to open the configuration file.")."</p>";
324 324
         $out .= "<p>";
325 325
         $out .= _("The profile will install itself after you click (or tap) the button. You will be asked for confirmation/input at several points:");
326 326
         $out .= "<ul>";
327
-        $out .= "<li>" . _("to install the profile") . "</li>";
328
-        $out .= "<li>" . ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount);
327
+        $out .= "<li>"._("to install the profile")."</li>";
328
+        $out .= "<li>".ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount);
329 329
         if ($certCount > 1) {
330
-            $out .= " " . sprintf(_("(%d times)"), $certCount);
330
+            $out .= " ".sprintf(_("(%d times)"), $certCount);
331 331
         }
332 332
         $out .= "</li>";
333
-        $out .= "<li>" . _("to enter the username and password you have been given by your organisation");
333
+        $out .= "<li>"._("to enter the username and password you have been given by your organisation");
334 334
         if ($ssidCount > 1) {
335
-            $out .= " " . sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount);
335
+            $out .= " ".sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount);
336 336
         }
337 337
         $out .= "</li>";
338 338
         $out .= "</ul>";
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
                <key>ServiceProviderRoamingEnabled</key>
373 373
                <true/>
374 374
                <key>DisplayedOperatorName</key>
375
-               <string>" . \config\ConfAssistant::CONSORTIUM['display_name'] . " via Passpoint</string>";
375
+               <string>" . \config\ConfAssistant::CONSORTIUM['display_name']." via Passpoint</string>";
376 376
         // if we don't know the realm, omit the entire DomainName key
377 377
         if (isset($this->attributes['internal:realm'])) {
378 378
             $retval .= "<key>DomainName</key>
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
         $retval .= "                <key>RoamingConsortiumOIs</key>
385 385
                 <array>";
386 386
 
387
-        $retval .= "<string>" . strtoupper($consortiumOi) . "</string>";
387
+        $retval .= "<string>".strtoupper($consortiumOi)."</string>";
388 388
 
389 389
         $retval .= "</array>";
390 390
         // this is an undocumented value found on the net. Does it do something useful?
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
                   <dict>
422 422
                       <key>AcceptEAPTypes</key>
423 423
                          <array>
424
-                            <integer>" . $eapType['OUTER'] . "</integer>
424
+                            <integer>" . $eapType['OUTER']."</integer>
425 425
                          </array>
426 426
                       <key>EAPFASTProvisionPAC</key>
427 427
                             <true />
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
 ";
435 435
         if ($realm !== NULL) {
436 436
             $retval .= "<key>OuterIdentity</key>
437
-                                    <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8') . "</string>
437
+                                    <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8')."</string>
438 438
 ";
439 439
         }
440 440
         $retval .= "<key>PayloadCertificateAnchorUUID</key>
@@ -458,11 +458,11 @@  discard block
 block discarded – undo
458 458
         $retval .= "
459 459
                          </array>";
460 460
         if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) {
461
-            $retval .= "<key>UserName</key><string>" . $this->clientCert["certObject"]->username . "</string>";
461
+            $retval .= "<key>UserName</key><string>".$this->clientCert["certObject"]->username."</string>";
462 462
         }
463 463
         $retval .= "
464 464
                       <key>TTLSInnerAuthentication</key>
465
-                         <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2") . "</string>
465
+                         <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2")."</string>
466 466
                    </dict>";
467 467
         return $retval;
468 468
     }
@@ -482,9 +482,9 @@  discard block
 block discarded – undo
482 482
             // characters are still reversed, invert on use!
483 483
             $buffer .= "<string>Manual</string>
484 484
                   <key>ProxyServer</key>
485
-                  <string>" . strrev($serverAndPort[1]) . "</string>
485
+                  <string>" . strrev($serverAndPort[1])."</string>
486 486
                   <key>ProxyServerPort</key>
487
-                  <integer>" . strrev($serverAndPort[0]) . "</integer>
487
+                  <integer>" . strrev($serverAndPort[0])."</integer>
488 488
                   <key>ProxyPACFallbackAllowed</key>
489 489
                   <false/>";
490 490
         } else {
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
                     throw new Exception("SSID must be a string!");
514 514
                 }
515 515
                 $escapedSSID = htmlspecialchars($toBeConfigured, ENT_XML1, 'UTF-8');
516
-                $payloadIdentifier = "wifi." . $this->serial;
516
+                $payloadIdentifier = "wifi.".$this->serial;
517 517
                 $payloadShortName = sprintf(_("SSID %s"), $escapedSSID);
518 518
                 $payloadName = sprintf(_("%s configuration for network name %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $escapedSSID);
519 519
                 $encryptionTypeString = "WPA";
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
                 $payloadIdentifier = "hs20.$toBeConfigured";
544 544
                 $knownOiName = array_search($toBeConfigured, \config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']);
545 545
                 if ($knownOiName === FALSE) { // a custom RCOI as set by the IdP admin; do not use the term "eduroam" in that one!
546
-                    $knownOiName = $this->instName . " "._("Roaming Partner");
546
+                    $knownOiName = $this->instName." "._("Roaming Partner");
547 547
                 }
548 548
                 $payloadShortName = $knownOiName;
549 549
                 $payloadName = _("Passpoint roaming configuration ($knownOiName)");
@@ -565,11 +565,11 @@  discard block
 block discarded – undo
565 565
                <key>PayloadDisplayName</key>
566 566
                   <string>$payloadShortName</string>
567 567
                <key>PayloadIdentifier</key>
568
-                  <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string>
568
+                  <string>".self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string>
569 569
                <key>PayloadOrganization</key>
570
-                  <string>" . $this->massagedConsortium . ".1x-config.org</string>
570
+                  <string>".$this->massagedConsortium.".1x-config.org</string>
571 571
                <key>PayloadType</key>
572
-                  <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi") . ".managed</string>";
572
+                  <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi").".managed</string>";
573 573
         $retval .= $this->proxySettings();
574 574
         $retval .= $setupModesString;
575 575
         if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) {
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
         }
582 582
         $retval .= "
583 583
                <key>PayloadUUID</key>
584
-                  <string>" . \core\common\Entity::uuid() . "</string>
584
+                  <string>" . \core\common\Entity::uuid()."</string>
585 585
                <key>PayloadVersion</key>
586 586
                   <integer>1</integer>
587 587
                   $wifiNetworkIdentification</dict>";
@@ -611,15 +611,15 @@  discard block
 block discarded – undo
611 611
 	<key>IsHotspot</key>
612 612
 	<false/>
613 613
 	<key>PayloadDescription</key>
614
-	<string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</string>
614
+	<string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name'])."</string>
615 615
 	<key>PayloadDisplayName</key>
616
-	<string>" . _("Disabled WiFi network") . "</string>
616
+	<string>" . _("Disabled WiFi network")."</string>
617 617
 	<key>PayloadIdentifier</key>
618
-	<string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string>
618
+	<string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string>
619 619
 	<key>PayloadType</key>
620 620
 	<string>com.apple.wifi.managed</string>
621 621
 	<key>PayloadUUID</key>
622
-	<string>" . \core\common\Entity::uuid() . "</string>
622
+	<string>".\core\common\Entity::uuid()."</string>
623 623
 	<key>PayloadVersion</key>
624 624
 	<real>1</real>";
625 625
         $retval .= $this->proxySettings();
@@ -698,12 +698,12 @@  discard block
 block discarded – undo
698 698
         $mimeBlob = base64_encode($binaryBlob);
699 699
         $mimeFormatted = chunk_split($mimeBlob, 52, "\r\n");
700 700
         $payloadUUID = \core\common\Entity::uuid('', $mimeBlob);
701
-        $retArray = ["block" => "<dict>" .
701
+        $retArray = ["block" => "<dict>".
702 702
             // we don't include the import password. It's displayed on screen, and should be input by the user.
703 703
             // <key>Password</key>
704 704
             //   <string>" . $this->clientCert['password'] . "</string>
705 705
             "<key>PayloadCertificateFileName</key>
706
-                     <string>" . $this->massagedConsortium . ".pfx</string>
706
+                     <string>" . $this->massagedConsortium.".pfx</string>
707 707
                   <key>PayloadContent</key>
708 708
                      <data>
709 709
 $mimeFormatted
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
                   <key>PayloadDescription</key>
712 712
                      <string>MIME Base-64 encoded PKCS#12 Client Certificate</string>
713 713
                   <key>PayloadDisplayName</key>
714
-                     <string>" . _("eduroam user certificate") . "</string>
714
+                     <string>"._("eduroam user certificate")."</string>
715 715
                   <key>PayloadIdentifier</key>
716 716
                      <string>com.apple.security.pkcs12.$payloadUUID</string>
717 717
                   <key>PayloadType</key>
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
                   <key>PayloadVersion</key>
722 722
                      <integer>1</integer>
723 723
                 </dict>",
724
-            "UUID" => $payloadUUID,];
724
+            "UUID" => $payloadUUID, ];
725 725
         \core\common\Entity::outOfThePotatoes();
726 726
         return $retArray;
727 727
     }
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
         }
740 740
         $expiryTime = new \DateTime($this->clientCert['certObject']->expiry);
741 741
         return "<key>RemovalDate</key>
742
-        <date>" . $expiryTime->format("Y-m-d") . "T" . $expiryTime->format("H:i:s") . "Z</date>";
742
+        <date>" . $expiryTime->format("Y-m-d")."T".$expiryTime->format("H:i:s")."Z</date>";
743 743
     }
744 744
 
745 745
     /**
@@ -761,27 +761,27 @@  discard block
 block discarded – undo
761 761
             $stream = "
762 762
             <dict>
763 763
                <key>PayloadCertificateFileName</key>
764
-               <string>" . $ca['uuid'] . ".der</string>
764
+               <string>" . $ca['uuid'].".der</string>
765 765
                <key>PayloadContent</key>
766 766
                <data>
767
-" . $trimmedPem . "</data>
767
+" . $trimmedPem."</data>
768 768
                <key>PayloadDescription</key>
769
-               <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst) . "</string>
769
+               <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst)."</string>
770 770
                <key>PayloadDisplayName</key>
771 771
                <string>" . 
772 772
                     /// example: "Identity Provider CA #1 (Root)"
773
-                    sprintf(_("%s CA #%d (%s)" ), 
773
+                    sprintf(_("%s CA #%d (%s)"), 
774 774
                             \core\common\Entity::$nomenclature_inst, 
775
-                            count($this->CAsAccountedFor)+1, 
776
-                            ($ca['root'] ? _("Root") : _("Intermediate"))) . 
775
+                            count($this->CAsAccountedFor) + 1, 
776
+                            ($ca['root'] ? _("Root") : _("Intermediate"))). 
777 777
               "</string>
778 778
                <key>PayloadIdentifier</key>
779
-               <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
779
+               <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
780 780
                <key>PayloadOrganization</key>
781
-               <string>" . $this->massagedConsortium . ".1x-config.org</string>
781
+               <string>".$this->massagedConsortium.".1x-config.org</string>
782 782
                <key>PayloadType</key>
783 783
                <string>com.apple.security.root</string>
784
-               <key>PayloadUUID</key><string>" . $ca['uuid'] . "</string>
784
+               <key>PayloadUUID</key><string>" . $ca['uuid']."</string>
785 785
                <key>PayloadVersion</key>
786 786
                <integer>1</integer>
787 787
             </dict>";
Please login to merge, or discard this patch.
core/DBConnection.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -66,24 +66,24 @@  discard block
 block discarded – undo
66 66
             case "EXTERNAL":
67 67
             case "FRONTEND":
68 68
             case "DIAGNOSTICS":
69
-                if (!isset(self::${"instance" . $theDb})) {
69
+                if (!isset(self::${"instance".$theDb})) {
70 70
                     $class = __CLASS__;
71
-                    self::${"instance" . $theDb} = new $class($database);
72
-                    DBConnection::${"instance" . $theDb}->databaseInstance = $theDb;
71
+                    self::${"instance".$theDb} = new $class($database);
72
+                    DBConnection::${"instance".$theDb}->databaseInstance = $theDb;
73 73
                 }
74
-                return self::${"instance" . $theDb};
74
+                return self::${"instance".$theDb};
75 75
             case "RADIUS":
76
-                if (!isset(self::${"instance" . $theDb})) {
76
+                if (!isset(self::${"instance".$theDb})) {
77 77
                     $class = __CLASS__;
78 78
                     foreach (\config\ConfAssistant::DB as $name => $oneRadiusAuthDb) {
79 79
                         $theInstance = new $class($name);
80
-                        self::${"instance" . $theDb}[] = $theInstance;
80
+                        self::${"instance".$theDb}[] = $theInstance;
81 81
                         $theInstance->databaseInstance = $theDb;
82 82
                     }
83 83
                 }
84
-                return self::${"instance" . $theDb};
84
+                return self::${"instance".$theDb};
85 85
             default:
86
-                throw new Exception("This type of database (" . strtoupper($database) . ") is not known!");
86
+                throw new Exception("This type of database (".strtoupper($database).") is not known!");
87 87
         }
88 88
     }
89 89
 
@@ -125,18 +125,18 @@  discard block
 block discarded – undo
125 125
             }
126 126
         }
127 127
         // log exact query to debug log, if log level is at 5
128
-        $this->loggerInstance->debug(5, "DB ATTEMPT: " . $querystring . "\n");
128
+        $this->loggerInstance->debug(5, "DB ATTEMPT: ".$querystring."\n");
129 129
         if ($types !== NULL) {
130
-            $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: " . print_r($arguments, true));
130
+            $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: ".print_r($arguments, true));
131 131
         }
132 132
 
133 133
         if ($this->connection->connect_error) {
134
-            throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number" . $this->connection->connect_error . ")!");
134
+            throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number".$this->connection->connect_error.")!");
135 135
         }
136 136
         if ($types === NULL) {
137 137
             $result = $this->connection->query($querystring);
138 138
             if ($result === FALSE) {
139
-                throw new Exception("DB: Unable to execute simple statement! Error was --> " . $this->connection->error . " <--");
139
+                throw new Exception("DB: Unable to execute simple statement! Error was --> ".$this->connection->error." <--");
140 140
             }
141 141
         } else {
142 142
             // fancy! prepared statement with dedicated argument list
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                 }
153 153
                 $prepResult = $statementObject->prepare($querystring);
154 154
                 if ($prepResult === FALSE) {
155
-                    throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> " . $statementObject->error . " <--.");
155
+                    throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> ".$statementObject->error." <--.");
156 156
                 }
157 157
                 $this->preparedStatements[$querystring] = $statementObject;
158 158
             }
@@ -165,11 +165,11 @@  discard block
 block discarded – undo
165 165
             array_unshift($localArray, $types);
166 166
             $retval = call_user_func_array([$statementObject, "bind_param"], $localArray);
167 167
             if ($retval === FALSE) {
168
-                throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> " . var_export($localArray, TRUE) . " <--. Error was --> " . $statementObject->error . " <--");
168
+                throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> ".var_export($localArray, TRUE)." <--. Error was --> ".$statementObject->error." <--");
169 169
             }
170 170
             $result = $statementObject->execute();
171 171
             if ($result === FALSE) {
172
-                throw new Exception("DB: Unable to execute prepared statement! Error was --> " . $statementObject->error . " <--");
172
+                throw new Exception("DB: Unable to execute prepared statement! Error was --> ".$statementObject->error." <--");
173 173
             }
174 174
             $selectResult = $statementObject->get_result();
175 175
             if ($selectResult !== FALSE) {
@@ -179,14 +179,14 @@  discard block
 block discarded – undo
179 179
 
180 180
         // all cases where $result could be FALSE have been caught earlier
181 181
         if ($this->connection->errno) {
182
-            throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was " . $this->connection->errno . "!");
182
+            throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was ".$this->connection->errno."!");
183 183
         }
184 184
 
185 185
 
186 186
         if ($isMoreThanSelect) {
187
-            $this->loggerInstance->writeSQLAudit("[DB: " . strtoupper($this->databaseInstance) . "] " . $querystring);
187
+            $this->loggerInstance->writeSQLAudit("[DB: ".strtoupper($this->databaseInstance)."] ".$querystring);
188 188
             if ($types !== NULL) {
189
-                $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: " . print_r($arguments, true));
189
+                $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: ".print_r($arguments, true));
190 190
             }
191 191
         }
192 192
         return $result;
@@ -281,13 +281,13 @@  discard block
 block discarded – undo
281 281
         if (isset(\config\Master::DB[$databaseCapitalised])) {
282 282
             $this->connection = new \mysqli(\config\Master::DB[$databaseCapitalised]['host'], \config\Master::DB[$databaseCapitalised]['user'], \config\Master::DB[$databaseCapitalised]['pass'], \config\Master::DB[$databaseCapitalised]['db']);
283 283
             if ($this->connection->connect_error) {
284
-                throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ").");
284
+                throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.").");
285 285
             }
286 286
             $this->readOnly = \config\Master::DB[$databaseCapitalised]['readonly'];
287 287
         } else { // one of the RADIUS DBs
288 288
             $this->connection = new \mysqli(\config\ConfAssistant::DB[$databaseCapitalised]['host'], \config\ConfAssistant::DB[$databaseCapitalised]['user'], \config\ConfAssistant::DB[$databaseCapitalised]['pass'], \config\ConfAssistant::DB[$databaseCapitalised]['db']);
289 289
             if ($this->connection->connect_error) {
290
-                throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ").");
290
+                throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.").");
291 291
             }
292 292
             $this->readOnly = \config\ConfAssistant::DB[$databaseCapitalised]['readonly'];
293 293
         }
Please login to merge, or discard this patch.
core/IdP.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -115,12 +115,12 @@  discard block
 block discarded – undo
115 115
         $this->name = $this->languageInstance->getLocalisedValue($this->getAttributes('general:instname'));
116 116
         $eligibility = $this->eligibility();
117 117
         if (in_array(IdP::ELIGIBILITY_IDP, $eligibility) && in_array(IdP::ELIGIBILITY_SP, $eligibility)) {
118
-            $eligType = IdP::TYPE_IDPSP . "";
118
+            $eligType = IdP::TYPE_IDPSP."";
119 119
             $this->type = $eligType;
120 120
         } elseif (in_array(IdP::ELIGIBILITY_IDP, $eligibility)) {
121
-            $eligType = IdP::TYPE_IDP . "";
121
+            $eligType = IdP::TYPE_IDP."";
122 122
         } else {
123
-            $eligType = IdP::TYPE_SP . "";
123
+            $eligType = IdP::TYPE_SP."";
124 124
         }
125 125
         $this->type = $eligType;
126 126
         $this->loggerInstance->debug(3, "--- END Constructing new IdP object ... ---\n");
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function listProfiles(bool $activeOnly = FALSE)
136 136
     {
137
-        $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier" . ($activeOnly ? " AND showtime = 1" : "");
137
+        $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier".($activeOnly ? " AND showtime = 1" : "");
138 138
         $allProfiles = $this->databaseHandle->exec($query);
139 139
         $returnarray = [];
140 140
         // SELECT -> resource, not boolean
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             $returnarray[] = $oneProfile;
145 145
         }
146 146
 
147
-        $this->loggerInstance->debug(4, "listProfiles: " . print_r($returnarray, true));
147
+        $this->loggerInstance->debug(4, "listProfiles: ".print_r($returnarray, true));
148 148
         return $returnarray;
149 149
     }
150 150
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      */
157 157
     public function listDeployments(bool $activeOnly = FALSE)
158 158
     {
159
-        $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier" . ($activeOnly ? " AND status = " . AbstractDeployment::ACTIVE : "");
159
+        $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier".($activeOnly ? " AND status = ".AbstractDeployment::ACTIVE : "");
160 160
         $allDeployments = $this->databaseHandle->exec($query);
161 161
         $returnarray = [];
162 162
         // SELECT -> resource, not boolean
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             $returnarray[] = new DeploymentManaged($this, $deploymentQuery->deployment_id);
165 165
         }
166 166
 
167
-        $this->loggerInstance->debug(4, "listDeployments: " . print_r($returnarray, true));
167
+        $this->loggerInstance->debug(4, "listDeployments: ".print_r($returnarray, true));
168 168
         return $returnarray;
169 169
     }
170 170
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
                 case AbstractProfile::PROFILETYPE_SILVERBULLET:
307 307
                     $theProfile = new ProfileSilverbullet($identifier, $this);
308 308
                     $theProfile->addSupportedEapMethod(new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET), 1);
309
-                    $theProfile->setRealm($this->identifier . "-" . $theProfile->identifier . "." . strtolower($this->federation) . strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix']));
309
+                    $theProfile->setRealm($this->identifier."-".$theProfile->identifier.".".strtolower($this->federation).strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix']));
310 310
                     return $theProfile;
311 311
                 default:
312 312
                     throw new Exception("This type of profile is unknown and can not be added.");
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
     public function getExternalDBId()
448 448
     {
449 449
         if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED
450
-            $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = " . self::EXTERNAL_DB_SYNCSTATE_SYNCED);
450
+            $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = ".self::EXTERNAL_DB_SYNCSTATE_SYNCED);
451 451
             // SELECT -> it's a resource, not a boolean
452 452
             if (mysqli_num_rows(/** @scrutinizer ignore-type */ $idQuery) == 0) {
453 453
                 return FALSE;
@@ -513,16 +513,16 @@  discard block
 block discarded – undo
513 513
         }
514 514
         foreach ($baseline as $lang => $value) {
515 515
             if (!key_exists($lang, $newvalues)) {
516
-                $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] DELETED";
516
+                $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] DELETED";
517 517
             } else {
518 518
                 if ($value != $newvalues[$lang]) {
519
-                    $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] CHANGED from '" . $baseline[$lang] . "' to '" . $newvalues[$lang] . "'";
519
+                    $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] CHANGED from '".$baseline[$lang]."' to '".$newvalues[$lang]."'";
520 520
                 }
521 521
             }
522 522
         }
523 523
         foreach ($newvalues as $lang => $value) {
524 524
             if (!key_exists($lang, $baseline)) {
525
-                $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] ADDED as '" . $value . "'";
525
+                $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] ADDED as '".$value."'";
526 526
             }
527 527
         }
528 528
         return $retval;
Please login to merge, or discard this patch.
core/ProfileRADIUS.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 
117 117
         $attributesLowLevel = array_merge($this->deviceLevelAttributes, $this->eapLevelAttributes);
118 118
 
119
-        $this->loggerInstance->debug(5, "Device-Level Attributes: " . print_r($this->deviceLevelAttributes, true));
120
-        $this->loggerInstance->debug(5, "EAP-Level Attributes: " . print_r($this->eapLevelAttributes, true));
121
-        $this->loggerInstance->debug(5, "All low-Level Attributes: " . print_r($attributesLowLevel, true));
119
+        $this->loggerInstance->debug(5, "Device-Level Attributes: ".print_r($this->deviceLevelAttributes, true));
120
+        $this->loggerInstance->debug(5, "EAP-Level Attributes: ".print_r($this->eapLevelAttributes, true));
121
+        $this->loggerInstance->debug(5, "All low-Level Attributes: ".print_r($attributesLowLevel, true));
122 122
 
123 123
         // now fetch and merge profile-level attributes if not already set on deeper level
124 124
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             }
138 138
         }
139 139
 
140
-        $this->loggerInstance->debug(5, "Merged Attributes: " . print_r($attributesLowLevel, true));
140
+        $this->loggerInstance->debug(5, "Merged Attributes: ".print_r($attributesLowLevel, true));
141 141
 
142 142
         // now, fetch and merge IdP-wide attributes
143 143
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                 "row" => $attributeQuery->row,
194 194
                 "flag" => $optinfo['flag'],
195 195
                 "device" => ($devicesOrEAPMethods == "DEVICES" ? $attributeQuery->deviceormethod : NULL),
196
-                "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep() )];
196
+                "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep())];
197 197
         }
198 198
         return $temparray;
199 199
     }
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
      */
303 303
     public function setAnonymousIDSupport($shallwe)
304 304
     {
305
-        $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier");
305
+        $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier");
306 306
     }
307 307
 
308 308
     /** Toggle special username for realm checks
@@ -313,8 +313,8 @@  discard block
 block discarded – undo
313 313
      */
314 314
     public function setRealmCheckUser($shallwe, $localpart = NULL)
315 315
     {
316
-        $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = " . ($shallwe === true ? "1" : "0") .
317
-                ( $localpart !== NULL ? ", checkuser_value = '$localpart' " : "") .
316
+        $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = ".($shallwe === true ? "1" : "0").
317
+                ($localpart !== NULL ? ", checkuser_value = '$localpart' " : "").
318 318
                 " WHERE profile_id = $this->identifier");
319 319
     }
320 320
 
@@ -327,8 +327,8 @@  discard block
 block discarded – undo
327 327
      */
328 328
     public function setInputVerificationPreference($verify, $hint)
329 329
     {
330
-        $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = " . ($verify === true ? "1" : "0") .
331
-                ", hint_userinput_suffix = " . ($hint === true ? "1" : "0") .
330
+        $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = ".($verify === true ? "1" : "0").
331
+                ", hint_userinput_suffix = ".($hint === true ? "1" : "0").
332 332
                 " WHERE profile_id = $this->identifier");
333 333
     }
334 334
 
Please login to merge, or discard this patch.
core/ProfileSilverbullet.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
 // realm is automatically calculated, then stored in DB
98 98
 
99
-        $this->realm = "opaquehash@$myInst->identifier-$this->identifier." . strtolower($myInst->federation) . \config\ConfAssistant::SILVERBULLET['realm_suffix'];
99
+        $this->realm = "opaquehash@$myInst->identifier-$this->identifier.".strtolower($myInst->federation).\config\ConfAssistant::SILVERBULLET['realm_suffix'];
100 100
         $localValueIfAny = "";
101 101
 
102 102
 // but there's some common internal attributes populated directly
@@ -113,11 +113,11 @@  discard block
 block discarded – undo
113 113
 
114 114
         // and we need to populate eap:server_name and eap:ca_file with the NRO-specific EAP information
115 115
         $silverbulletAttributes = [
116
-            "eap:server_name" => "auth." . strtolower($myFed->tld) . \config\ConfAssistant::SILVERBULLET['server_suffix'],
116
+            "eap:server_name" => "auth.".strtolower($myFed->tld).\config\ConfAssistant::SILVERBULLET['server_suffix'],
117 117
         ];
118 118
         $temp = array_merge($this->addInternalAttributes($internalAttributes), $this->addInternalAttributes($silverbulletAttributes));
119 119
         $x509 = new \core\common\X509();
120
-        $caHandle = fopen(dirname(__FILE__) . "/../config/SilverbulletServerCerts/" . strtoupper($myFed->tld) . "/root.pem", "r");
120
+        $caHandle = fopen(dirname(__FILE__)."/../config/SilverbulletServerCerts/".strtoupper($myFed->tld)."/root.pem", "r");
121 121
         if ($caHandle !== FALSE) {
122 122
             $cAFile = fread($caHandle, 16000000);
123 123
             foreach ($x509->splitCertificate($cAFile) as $oneCa) {
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
         if (empty($certNames)) {
274 274
             return [];
275 275
         }
276
-        $namesCondensed = "'" . implode("' OR username = '", $certNames) . "'";
276
+        $namesCondensed = "'".implode("' OR username = '", $certNames)."'";
277 277
         $serverHandles = DBConnection::handle("RADIUS");
278 278
         $returnarray = [];
279 279
         foreach ($serverHandles as $oneDbServer) {
Please login to merge, or discard this patch.
core/Federation.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -132,20 +132,20 @@  discard block
 block discarded – undo
132 132
                     if ($device == "TOTAL") {
133 133
                         continue;
134 134
                     }
135
-                    $retstring .= "<tr><td>$device</td><td>" . $numbers['ADMIN'] . "</td><td>" . $numbers['SILVERBULLET'] . "</td><td>" . $numbers['USER'] . "</td></tr>";
135
+                    $retstring .= "<tr><td>$device</td><td>".$numbers['ADMIN']."</td><td>".$numbers['SILVERBULLET']."</td><td>".$numbers['USER']."</td></tr>";
136 136
                 }
137
-                $retstring .= "<tr><td><strong>TOTAL</strong></td><td><strong>" . $data['TOTAL']['ADMIN'] . "</strong></td><td><strong>" . $data['TOTAL']['SILVERBULLET'] . "</strong></td><td><strong>" . $data['TOTAL']['USER'] . "</strong></td></tr>";
137
+                $retstring .= "<tr><td><strong>TOTAL</strong></td><td><strong>".$data['TOTAL']['ADMIN']."</strong></td><td><strong>".$data['TOTAL']['SILVERBULLET']."</strong></td><td><strong>".$data['TOTAL']['USER']."</strong></td></tr>";
138 138
                 break;
139 139
             case "XML":
140 140
                 // the calls to date() operate on current date, so there is no chance for a FALSE to be returned. Silencing scrutinizer.
141
-                $retstring .= "<federation id='$this->tld' ts='" . /** @scrutinizer ignore-type */ date("Y-m-d") . "T" . /** @scrutinizer ignore-type */ date("H:i:s") . "'>\n";
141
+                $retstring .= "<federation id='$this->tld' ts='"./** @scrutinizer ignore-type */ date("Y-m-d")."T"./** @scrutinizer ignore-type */ date("H:i:s")."'>\n";
142 142
                 foreach ($data as $device => $numbers) {
143 143
                     if ($device == "TOTAL") {
144 144
                         continue;
145 145
                     }
146
-                    $retstring .= "  <device name='" . $device . "'>\n    <downloads group='admin'>" . $numbers['ADMIN'] . "</downloads>\n    <downloads group='managed_idp'>" . $numbers['SILVERBULLET'] . "</downloads>\n    <downloads group='user'>" . $numbers['USER'] . "</downloads>\n  </device>";
146
+                    $retstring .= "  <device name='".$device."'>\n    <downloads group='admin'>".$numbers['ADMIN']."</downloads>\n    <downloads group='managed_idp'>".$numbers['SILVERBULLET']."</downloads>\n    <downloads group='user'>".$numbers['USER']."</downloads>\n  </device>";
147 147
                 }
148
-                $retstring .= "<total>\n  <downloads group='admin'>" . $data['TOTAL']['ADMIN'] . "</downloads>\n  <downloads group='managed_idp'>" . $data['TOTAL']['SILVERBULLET'] . "</downloads>\n  <downloads group='user'>" . $data['TOTAL']['USER'] . "</downloads>\n</total>\n";
148
+                $retstring .= "<total>\n  <downloads group='admin'>".$data['TOTAL']['ADMIN']."</downloads>\n  <downloads group='managed_idp'>".$data['TOTAL']['SILVERBULLET']."</downloads>\n  <downloads group='user'>".$data['TOTAL']['USER']."</downloads>\n</total>\n";
149 149
                 $retstring .= "</federation>";
150 150
                 break;
151 151
             case "array":
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         $identifier = $this->databaseHandle->lastID();
238 238
 
239 239
         if ($identifier == 0 || !$this->loggerInstance->writeAudit($ownerId, "NEW", "Organisation $identifier")) {
240
-            $text = "<p>Could not create a new " . \config\ConfAssistant::CONSORTIUM['nomenclature_inst'] . "!</p>";
240
+            $text = "<p>Could not create a new ".\config\ConfAssistant::CONSORTIUM['nomenclature_inst']."!</p>";
241 241
             echo $text;
242 242
             throw new Exception($text);
243 243
         }
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
             return; // no update to fetch
380 380
         }
381 381
         $certDetails = openssl_x509_parse($entryInQuestion['CERT']);
382
-        $expiry = "20" . $certDetails['validTo'][0] . $certDetails['validTo'][1] . "-" . $certDetails['validTo'][2] . $certDetails['validTo'][3] . "-" . $certDetails['validTo'][4] . $certDetails['validTo'][5];
382
+        $expiry = "20".$certDetails['validTo'][0].$certDetails['validTo'][1]."-".$certDetails['validTo'][2].$certDetails['validTo'][3]."-".$certDetails['validTo'][4].$certDetails['validTo'][5];
383 383
         openssl_x509_export($entryInQuestion['CERT'], $pem);
384 384
         $updateQuery = "UPDATE federation_servercerts SET status = 'ISSUED', certificate = ?, expiry = ? WHERE ca_name = 'eduPKI' AND request_serial = ?";
385 385
         $this->databaseHandle->exec($updateQuery, "ssi", $pem, $expiry, $reqSerial);
Please login to merge, or discard this patch.
core/common/Language.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
         $loggerInstance = new \core\common\Logging();
76 76
         $olddomain = textdomain(NULL);
77 77
         $loggerInstance->debug(4, "set_locale($domain)\n");
78
-        $loggerInstance->debug(4, ROOT . "\n");
78
+        $loggerInstance->debug(4, ROOT."\n");
79 79
         textdomain($domain);
80
-        bindtextdomain($domain, ROOT . "/translation/");
80
+        bindtextdomain($domain, ROOT."/translation/");
81 81
         return $olddomain;
82 82
     }
83 83
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
             // check if this language is supported by the CAT config
130 130
             foreach (\config\Master::LANGUAGES as $language => $value) {
131
-                if (preg_match("/^" . $language . ".*/", $tryLang)) {
131
+                if (preg_match("/^".$language.".*/", $tryLang)) {
132 132
                     $localeTmp = $value['locale'];
133 133
                     $langIndex = $language; // ???
134 134
                     break;
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 }
144 144
             }
145 145
         }
146
-        putenv("LC_ALL=" . $theLocale);
146
+        putenv("LC_ALL=".$theLocale);
147 147
         $_SESSION['language'] = $langIndex;
148 148
         $loggerInstance = new \core\common\Logging();
149 149
         $loggerInstance->debug(4, "selected lang:$langIndex:$theLocale\n");
Please login to merge, or discard this patch.