Test Setup Failed
Push — master ( 25777d...85d563 )
by Stefan
05:58
created
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   +49 added lines, -49 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,21 +219,21 @@  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 ($this->attributes['internal:hint_userinput_suffix'][0] != 0) {
226
-                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username MUST end exactly with '...@%s' !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST;
226
+                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username MUST end exactly with '...@%s' !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST;
227 227
                 \core\common\Entity::outOfThePotatoes();
228 228
                 return $retval;
229 229
             } else { 
230 230
             if (strlen($this->attributes['internal:realm'][0]) > 0) {
231 231
                 /// note space between variable and exclamation mark - makes sure users don't mistakenly think the exclamation mark is part of the required username!
232
-                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username MUST contain an '@' and end with ...%s !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST;
232
+                $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username MUST contain an '@' and end with ...%s !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST;
233 233
                 \core\common\Entity::outOfThePotatoes();
234 234
                 return $retval;
235 235
             }
236
-            $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;
236
+            $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;
237 237
             \core\common\Entity::outOfThePotatoes();
238 238
             return $retval;
239 239
             }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         // also escape htmlspecialchars
258 258
         // not all names and profiles have a name, so be prepared
259 259
 
260
-        $this->loggerInstance->debug(5, "List of available attributes: " . var_export($this->attributes, TRUE));
260
+        $this->loggerInstance->debug(5, "List of available attributes: ".var_export($this->attributes, TRUE));
261 261
 
262 262
         $this->instName = $this->attributes['general:instname'][0] ?? _("Unnamed Organisation");
263 263
         $this->profileName = $this->attributes['profile:name'][0] ?? _("Unnamed Profile");
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 
300 300
         file_put_contents('installer_profile', $outputXml);
301 301
 
302
-        $fileName = $this->installerBasename . '.mobileconfig';
302
+        $fileName = $this->installerBasename.'.mobileconfig';
303 303
 
304 304
         if (!$this->sign) {
305 305
             rename("installer_profile", $fileName);
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
             return $fileName;
308 308
         }
309 309
         // still here? Then we are signing.
310
-        $signing = system($this->sign . " installer_profile '$fileName' > /dev/null");
310
+        $signing = system($this->sign." installer_profile '$fileName' > /dev/null");
311 311
         if ($signing === FALSE) {
312 312
             $this->loggerInstance->debug(2, "Signing the mobileconfig installer $fileName FAILED!\n");
313 313
         }
@@ -326,19 +326,19 @@  discard block
 block discarded – undo
326 326
         \core\common\Entity::intoThePotatoes();
327 327
         $ssidCount = count($this->attributes['internal:SSID']);
328 328
         $certCount = count($this->attributes['internal:CAs'][0]);
329
-        $out = "<p>" . _("For best results, please use the built-in browser (Safari) to open the configuration file.") . "</p>";
329
+        $out = "<p>"._("For best results, please use the built-in browser (Safari) to open the configuration file.")."</p>";
330 330
         $out .= "<p>";
331 331
         $out .= _("The profile will install itself after you click (or tap) the button. You will be asked for confirmation/input at several points:");
332 332
         $out .= "<ul>";
333
-        $out .= "<li>" . _("to install the profile") . "</li>";
334
-        $out .= "<li>" . ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount);
333
+        $out .= "<li>"._("to install the profile")."</li>";
334
+        $out .= "<li>".ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount);
335 335
         if ($certCount > 1) {
336
-            $out .= " " . sprintf(_("(%d times)"), $certCount);
336
+            $out .= " ".sprintf(_("(%d times)"), $certCount);
337 337
         }
338 338
         $out .= "</li>";
339
-        $out .= "<li>" . _("to enter the username and password you have been given by your organisation");
339
+        $out .= "<li>"._("to enter the username and password you have been given by your organisation");
340 340
         if ($ssidCount > 1) {
341
-            $out .= " " . sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount);
341
+            $out .= " ".sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount);
342 342
         }
343 343
         $out .= "</li>";
344 344
         $out .= "</ul>";
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
                <key>ServiceProviderRoamingEnabled</key>
379 379
                <true/>
380 380
                <key>DisplayedOperatorName</key>
381
-               <string>" . \config\ConfAssistant::CONSORTIUM['display_name'] . " via Passpoint</string>";
381
+               <string>" . \config\ConfAssistant::CONSORTIUM['display_name']." via Passpoint</string>";
382 382
         // if we don't know the realm, omit the entire DomainName key
383 383
         if (isset($this->attributes['internal:realm'])) {
384 384
             $retval .= "<key>DomainName</key>
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
         $retval .= "                <key>RoamingConsortiumOIs</key>
391 391
                 <array>";
392 392
 
393
-        $retval .= "<string>" . strtoupper($consortiumOi) . "</string>";
393
+        $retval .= "<string>".strtoupper($consortiumOi)."</string>";
394 394
 
395 395
         $retval .= "</array>";
396 396
         // this is an undocumented value found on the net. Does it do something useful?
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
                   <dict>
428 428
                       <key>AcceptEAPTypes</key>
429 429
                          <array>
430
-                            <integer>" . $eapType['OUTER'] . "</integer>
430
+                            <integer>" . $eapType['OUTER']."</integer>
431 431
                          </array>
432 432
                       <key>EAPFASTProvisionPAC</key>
433 433
                             <true />
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
 ";
441 441
         if ($realm !== NULL) {
442 442
             $retval .= "<key>OuterIdentity</key>
443
-                                    <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8') . "</string>
443
+                                    <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8')."</string>
444 444
 ";
445 445
         }
446 446
         $retval .= "<key>PayloadCertificateAnchorUUID</key>
@@ -464,11 +464,11 @@  discard block
 block discarded – undo
464 464
         $retval .= "
465 465
                          </array>";
466 466
         if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) {
467
-            $retval .= "<key>UserName</key><string>" . $this->clientCert["certObject"]->username . "</string>";
467
+            $retval .= "<key>UserName</key><string>".$this->clientCert["certObject"]->username."</string>";
468 468
         }
469 469
         $retval .= "
470 470
                       <key>TTLSInnerAuthentication</key>
471
-                         <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2") . "</string>
471
+                         <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2")."</string>
472 472
                    </dict>";
473 473
         return $retval;
474 474
     }
@@ -488,9 +488,9 @@  discard block
 block discarded – undo
488 488
             // characters are still reversed, invert on use!
489 489
             $buffer .= "<string>Manual</string>
490 490
                   <key>ProxyServer</key>
491
-                  <string>" . strrev($serverAndPort[1]) . "</string>
491
+                  <string>" . strrev($serverAndPort[1])."</string>
492 492
                   <key>ProxyServerPort</key>
493
-                  <integer>" . strrev($serverAndPort[0]) . "</integer>
493
+                  <integer>" . strrev($serverAndPort[0])."</integer>
494 494
                   <key>ProxyPACFallbackAllowed</key>
495 495
                   <false/>";
496 496
         } else {
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
                     throw new Exception("SSID must be a string!");
520 520
                 }
521 521
                 $escapedSSID = htmlspecialchars($toBeConfigured, ENT_XML1, 'UTF-8');
522
-                $payloadIdentifier = "wifi." . $this->serial;
522
+                $payloadIdentifier = "wifi.".$this->serial;
523 523
                 $payloadShortName = sprintf(_("SSID %s"), $escapedSSID);
524 524
                 $payloadName = sprintf(_("%s configuration for network name %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $escapedSSID);
525 525
                 $encryptionTypeString = "WPA";
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
                 $payloadIdentifier = "hs20.$toBeConfigured";
550 550
                 $knownOiName = array_search($toBeConfigured, \config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']);
551 551
                 if ($knownOiName === FALSE) { // a custom RCOI as set by the IdP admin; do not use the term "eduroam" in that one!
552
-                    $knownOiName = $this->instName . " "._("Roaming Partner");
552
+                    $knownOiName = $this->instName." "._("Roaming Partner");
553 553
                 }
554 554
                 $payloadShortName = $knownOiName;
555 555
                 $payloadName = _("Passpoint roaming configuration ($knownOiName)");
@@ -571,11 +571,11 @@  discard block
 block discarded – undo
571 571
                <key>PayloadDisplayName</key>
572 572
                   <string>$payloadShortName</string>
573 573
                <key>PayloadIdentifier</key>
574
-                  <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string>
574
+                  <string>".self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string>
575 575
                <key>PayloadOrganization</key>
576
-                  <string>" . $this->massagedConsortium . ".1x-config.org</string>
576
+                  <string>".$this->massagedConsortium.".1x-config.org</string>
577 577
                <key>PayloadType</key>
578
-                  <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi") . ".managed</string>";
578
+                  <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi").".managed</string>";
579 579
         $retval .= $this->proxySettings();
580 580
         $retval .= $setupModesString;
581 581
         if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) {
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
         }
588 588
         $retval .= "
589 589
                <key>PayloadUUID</key>
590
-                  <string>" . \core\common\Entity::uuid() . "</string>
590
+                  <string>" . \core\common\Entity::uuid()."</string>
591 591
                <key>PayloadVersion</key>
592 592
                   <integer>1</integer>
593 593
                   $wifiNetworkIdentification</dict>";
@@ -617,15 +617,15 @@  discard block
 block discarded – undo
617 617
 	<key>IsHotspot</key>
618 618
 	<false/>
619 619
 	<key>PayloadDescription</key>
620
-	<string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</string>
620
+	<string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name'])."</string>
621 621
 	<key>PayloadDisplayName</key>
622
-	<string>" . _("Disabled WiFi network") . "</string>
622
+	<string>" . _("Disabled WiFi network")."</string>
623 623
 	<key>PayloadIdentifier</key>
624
-	<string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string>
624
+	<string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string>
625 625
 	<key>PayloadType</key>
626 626
 	<string>com.apple.wifi.managed</string>
627 627
 	<key>PayloadUUID</key>
628
-	<string>" . \core\common\Entity::uuid() . "</string>
628
+	<string>".\core\common\Entity::uuid()."</string>
629 629
 	<key>PayloadVersion</key>
630 630
 	<real>1</real>";
631 631
         $retval .= $this->proxySettings();
@@ -704,12 +704,12 @@  discard block
 block discarded – undo
704 704
         $mimeBlob = base64_encode($binaryBlob);
705 705
         $mimeFormatted = chunk_split($mimeBlob, 52, "\r\n");
706 706
         $payloadUUID = \core\common\Entity::uuid('', $mimeBlob);
707
-        $retArray = ["block" => "<dict>" .
707
+        $retArray = ["block" => "<dict>".
708 708
             // we don't include the import password. It's displayed on screen, and should be input by the user.
709 709
             // <key>Password</key>
710 710
             //   <string>" . $this->clientCert['password'] . "</string>
711 711
             "<key>PayloadCertificateFileName</key>
712
-                     <string>" . $this->massagedConsortium . ".pfx</string>
712
+                     <string>" . $this->massagedConsortium.".pfx</string>
713 713
                   <key>PayloadContent</key>
714 714
                      <data>
715 715
 $mimeFormatted
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
                   <key>PayloadDescription</key>
718 718
                      <string>MIME Base-64 encoded PKCS#12 Client Certificate</string>
719 719
                   <key>PayloadDisplayName</key>
720
-                     <string>" . _("User certificate") . "</string>
720
+                     <string>"._("User certificate")."</string>
721 721
                   <key>PayloadIdentifier</key>
722 722
                      <string>com.apple.security.pkcs12.$payloadUUID</string>
723 723
                   <key>PayloadType</key>
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
                   <key>PayloadVersion</key>
728 728
                      <integer>1</integer>
729 729
                 </dict>",
730
-            "UUID" => $payloadUUID,];
730
+            "UUID" => $payloadUUID, ];
731 731
         \core\common\Entity::outOfThePotatoes();
732 732
         return $retArray;
733 733
     }
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
         }
746 746
         $expiryTime = new \DateTime($this->clientCert['certObject']->expiry);
747 747
         return "<key>RemovalDate</key>
748
-        <date>" . $expiryTime->format("Y-m-d") . "T" . $expiryTime->format("H:i:s") . "Z</date>";
748
+        <date>" . $expiryTime->format("Y-m-d")."T".$expiryTime->format("H:i:s")."Z</date>";
749 749
     }
750 750
 
751 751
     /**
@@ -767,27 +767,27 @@  discard block
 block discarded – undo
767 767
             $stream = "
768 768
             <dict>
769 769
                <key>PayloadCertificateFileName</key>
770
-               <string>" . $ca['uuid'] . ".der</string>
770
+               <string>" . $ca['uuid'].".der</string>
771 771
                <key>PayloadContent</key>
772 772
                <data>
773
-" . $trimmedPem . "</data>
773
+" . $trimmedPem."</data>
774 774
                <key>PayloadDescription</key>
775
-               <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst) . "</string>
775
+               <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst)."</string>
776 776
                <key>PayloadDisplayName</key>
777 777
                <string>" . 
778 778
                     /// example: "Identity Provider CA #1 (Root)"
779
-                    sprintf(_("%s CA #%d (%s)" ), 
779
+                    sprintf(_("%s CA #%d (%s)"), 
780 780
                             \core\common\Entity::$nomenclature_inst, 
781
-                            count($this->CAsAccountedFor)+1, 
782
-                            ($ca['root'] ? _("Root") : _("Intermediate"))) . 
781
+                            count($this->CAsAccountedFor) + 1, 
782
+                            ($ca['root'] ? _("Root") : _("Intermediate"))). 
783 783
               "</string>
784 784
                <key>PayloadIdentifier</key>
785
-               <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
785
+               <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string>
786 786
                <key>PayloadOrganization</key>
787
-               <string>" . $this->massagedConsortium . ".1x-config.org</string>
787
+               <string>".$this->massagedConsortium.".1x-config.org</string>
788 788
                <key>PayloadType</key>
789 789
                <string>com.apple.security.root</string>
790
-               <key>PayloadUUID</key><string>" . $ca['uuid'] . "</string>
790
+               <key>PayloadUUID</key><string>" . $ca['uuid']."</string>
791 791
                <key>PayloadVersion</key>
792 792
                <integer>1</integer>
793 793
             </dict>";
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.
core/common/X509.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
     public function der2pem($derData)
89 89
     {
90 90
         $pem = chunk_split(base64_encode($derData), 64, "\n");
91
-        $pem = "-----BEGIN CERTIFICATE-----\n" . $pem . "-----END CERTIFICATE-----\n";
91
+        $pem = "-----BEGIN CERTIFICATE-----\n".$pem."-----END CERTIFICATE-----\n";
92 92
         return $pem;
93 93
     }
94 94
 
Please login to merge, or discard this patch.
core/common/Logging.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     private function writeToFile($filename, $message)
51 51
     {
52
-        file_put_contents(\config\Master::PATHS['logdir'] . "/$filename", sprintf("%-015s", microtime(TRUE)) . $message, FILE_APPEND);
52
+        file_put_contents(\config\Master::PATHS['logdir']."/$filename", sprintf("%-015s", microtime(TRUE)).$message, FILE_APPEND);
53 53
     }
54 54
 
55 55
     /**
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         } else {
82 82
             $output .= var_export($stuff, TRUE);
83 83
         }
84
-        $output = $prefix . $output . $suffix;
84
+        $output = $prefix.$output.$suffix;
85 85
         $this->writeToFile("debug.log", $output);
86 86
 
87 87
         return;
@@ -129,6 +129,6 @@  discard block
 block discarded – undo
129 129
         $logTextStep1 = preg_replace("/[\n\r]/", "", $query);
130 130
         $logTextStep2 = preg_replace("/ +/", " ", $logTextStep1);
131 131
         $logTextStep3 = iconv("UTF-8", "UTF-8//IGNORE", $logTextStep2);
132
-        $this->writeToFile("audit-SQL.log", " " . $logTextStep3 . "\n");
132
+        $this->writeToFile("audit-SQL.log", " ".$logTextStep3."\n");
133 133
     }
134 134
 }
135 135
\ No newline at end of file
Please login to merge, or discard this patch.
core/UserNetAPI.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $returnArray = [];
70 70
         $returnArray['status'] = $status;
71 71
         $returnArray['data'] = $data;
72
-        $returnArray['tou'] = "Please consult Terms of Use at: //" . $host . \core\CAT::getRootUrlPath() . "/tou.php";
72
+        $returnArray['tou'] = "Please consult Terms of Use at: //".$host.\core\CAT::getRootUrlPath()."/tou.php";
73 73
         if (!empty($otherData)) {
74 74
             $returnArray['otherdata'] = $otherData;
75 75
         }
@@ -311,8 +311,8 @@  discard block
 block discarded – undo
311 311
     public function sendLogo($identifier, $type, $width, $height)
312 312
     {
313 313
         $logo = $this->getLogo($identifier, $type, $width, $height);
314
-        $blob = $logo === NULL ? file_get_contents(ROOT . '/web/resources/images/empty.png') : $logo['blob'];
315
-        header("Content-type: " . $logo['filetype']);
314
+        $blob = $logo === NULL ? file_get_contents(ROOT.'/web/resources/images/empty.png') : $logo['blob'];
315
+        header("Content-type: ".$logo['filetype']);
316 316
         header("Cache-Control:max-age=36000, must-revalidate");
317 317
         header($logo['expires']);
318 318
         echo $blob;
Please login to merge, or discard this patch.
core/DeviceFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
         parent::__construct();
66 66
         $Dev = \devices\Devices::listDevices();
67 67
         if (isset($Dev[$blueprint])) {
68
-            $this->loggerInstance->debug(4, "loaded: devices/" . $Dev[$blueprint]['directory'] . "/" . $Dev[$blueprint]['module'] . ".php\n");
69
-            $class_name = "\devices\\" . $Dev[$blueprint]['directory'] . "\Device" . $Dev[$blueprint]['module'];
68
+            $this->loggerInstance->debug(4, "loaded: devices/".$Dev[$blueprint]['directory']."/".$Dev[$blueprint]['module'].".php\n");
69
+            $class_name = "\devices\\".$Dev[$blueprint]['directory']."\Device".$Dev[$blueprint]['module'];
70 70
             $this->device = new $class_name();
71 71
             if (!$this->device) {
72 72
                 $this->loggerInstance->debug(2, "module loading failed");
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         } else {
76 76
             echo("unknown devicename:$blueprint\n");
77 77
         }
78
-        $this->device->module_path = ROOT . '/devices/' . $Dev[$blueprint]['directory'];
78
+        $this->device->module_path = ROOT.'/devices/'.$Dev[$blueprint]['directory'];
79 79
         $this->device->signer = isset($Dev[$blueprint]['signer']) ? $Dev[$blueprint]['signer'] : 0;
80 80
         $this->device->device_id = $blueprint;
81 81
         $options = \devices\Devices::$Options;
Please login to merge, or discard this patch.
core/diag/Sociopath.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                 "TXT" => _("If you use more than one device: do your other devices still work?"),
109 109
                 "FACTOR_YES" => 0.33, // seems that all is okay with the account as such
110 110
                 "FACTOR_NO" => 3, // now that is suspicious indeed
111
-                "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"),],
111
+                "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"), ],
112 112
             6 => ["AREA" => AbstractTest::INFRA_SP_80211,
113 113
                 "TXT" => _("Is the place you are currently at heavily crowded, or is a network-intensive workload going on?"),
114 114
                 "FACTOR_YES" => 3,
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
         $questionDetails = $this->qaArray[$questionNumber];
145 145
         if ($answer === TRUE) {
146 146
             $this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] * $questionDetails["FACTOR_YES"];
147
-            $this->loggerInstance->debug(3, "Adjusting " . $questionDetails['AREA'] . " by " . $questionDetails["FACTOR_YES"] . "\n");
147
+            $this->loggerInstance->debug(3, "Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_YES"]."\n");
148 148
             $factor = $questionDetails["FACTOR_YES"];
149 149
         } elseif ($answer === FALSE) {
150 150
             $this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] * $questionDetails["FACTOR_NO"];
151
-            $this->loggerInstance->debug(3, "Adjusting " . $questionDetails['AREA'] . " by " . $questionDetails["FACTOR_NO"] . "\n");
151
+            $this->loggerInstance->debug(3, "Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_NO"]."\n");
152 152
             $factor = $questionDetails["FACTOR_NO"];
153 153
         } else {
154 154
             $factor = 1;
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         // if both are identical, take any of the questions in the pool of both
184 184
         foreach ($this->qaArray as $questionNumber => $questionDetails) {
185 185
             // if we find a question we didn't ask before AND it is related to our currently high-scoring problem area, ask it
186
-            if (!array_key_exists($questionNumber, $this->previousQuestions) && ( $questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory)) {
186
+            if (!array_key_exists($questionNumber, $this->previousQuestions) && ($questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory)) {
187 187
                 return json_encode(["NEXTEXISTS" => TRUE, "NUMBER" => $questionNumber, "TEXT" => $questionDetails["TXT"]]);
188 188
             }
189 189
         }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $text = $this->genericVerdictTexts[$area];
212 212
         foreach ($this->previousQuestions as $number => $factor) {
213 213
             if ($this->qaArray[$number]["AREA"] == $area && $factor > 1) {
214
-                $text .= "\n\n" . $this->qaArray[$number]["VERDICTLECTURE"];
214
+                $text .= "\n\n".$this->qaArray[$number]["VERDICTLECTURE"];
215 215
             }
216 216
         }
217 217
         return $text;
Please login to merge, or discard this patch.