Test Failed
Push — master ( a393f2...e4ce85 )
by Stefan
08:15
created
core/SanityTests.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $this->test_result = [];
130 130
         $this->test_result['global'] = 0;
131 131
         // parse the schema file to find out the number of expected rows...
132
-        $schema = file(dirname(dirname(__FILE__)) . "/schema/schema.sql");
132
+        $schema = file(dirname(dirname(__FILE__))."/schema/schema.sql");
133 133
         $this->profileOptionCount = 0;
134 134
         $passedTheWindmill = FALSE;
135 135
         foreach ($schema as $schemaLine) {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     {
157 157
         $this->out[$test] = [];
158 158
         $this->name = $test;
159
-        $m_name = 'test' . $test;
159
+        $m_name = 'test'.$test;
160 160
         $this->test_result[$test] = 0;
161 161
         if (!method_exists($this, $m_name)) {
162 162
             $this->storeTestResult(\core\common\Entity::L_ERROR, "Configuration error, no test configured for <strong>$test</strong>.");
@@ -269,9 +269,9 @@  discard block
 block discarded – undo
269 269
     private function testPhp()
270 270
     {
271 271
         if (version_compare(phpversion(), $this->needversionPHP, '>=')) {
272
-            $this->storeTestResult(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running " . phpversion() . ".");
272
+            $this->storeTestResult(\core\common\Entity::L_OK, "<strong>PHP</strong> is sufficiently recent. You are running ".phpversion().".");
273 273
         } else {
274
-            $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>PHP</strong> is too old. We need at least $this->needversionPHP, but you only have " . phpversion() . ".");
274
+            $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>PHP</strong> is too old. We need at least $this->needversionPHP, but you only have ".phpversion().".");
275 275
         }
276 276
     }
277 277
     
@@ -284,12 +284,12 @@  discard block
 block discarded – undo
284 284
      */
285 285
     private function runConstantsTest($config)
286 286
     {
287
-        $templateConfig = file_get_contents(ROOT . "/config/$config-template.php");
288
-        $newTemplateConfig = preg_replace("/class *$config/", "class $config" . "_template", $templateConfig);
289
-        file_put_contents(ROOT . "/var/tmp/$config-template.php", $newTemplateConfig);
290
-        include(ROOT . "/var/tmp/$config-template.php");
291
-        unlink(ROOT . "/var/tmp/$config-template.php");
292
-        $rft = new \ReflectionClass("\config\\$config" . "_template");
287
+        $templateConfig = file_get_contents(ROOT."/config/$config-template.php");
288
+        $newTemplateConfig = preg_replace("/class *$config/", "class $config"."_template", $templateConfig);
289
+        file_put_contents(ROOT."/var/tmp/$config-template.php", $newTemplateConfig);
290
+        include(ROOT."/var/tmp/$config-template.php");
291
+        unlink(ROOT."/var/tmp/$config-template.php");
292
+        $rft = new \ReflectionClass("\config\\$config"."_template");
293 293
         $templateConstants = $rft->getConstants();
294 294
         $failResults = [];
295 295
         foreach ($templateConstants as $constant => $value) {
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      * Check if all required constants are set
307 307
      */
308 308
     private function testConfigConstants() {
309
-        set_error_handler(function ($severity, $message, $file, $line) {
309
+        set_error_handler(function($severity, $message, $file, $line) {
310 310
             throw new \ErrorException($message, $severity, $severity, $file, $line);
311 311
         });
312 312
         
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
             $failCount = $failCount + count($failResults);
318 318
             if (count($failResults) > 0) {
319 319
             $this->storeTestResult(\core\common\Entity::L_ERROR, 
320
-                    "<strong>The following constants are not set:</strong>" . implode(', ', $failResults));
320
+                    "<strong>The following constants are not set:</strong>".implode(', ', $failResults));
321 321
             }
322 322
         }
323 323
         
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
             $this->storeTestResult(\core\common\Entity::L_OK, "<strong>cat_base_url</strong> set correctly");
342 342
         } else {
343 343
             $rootFromScript = $m[1] === '' ? '/' : $m[1];
344
-            $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>cat_base_url</strong> is set to <strong>" . \config\Master::PATHS['cat_base_url'] . "</strong> and should be <strong>$rootFromScript</strong>");
344
+            $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>cat_base_url</strong> is set to <strong>".\config\Master::PATHS['cat_base_url']."</strong> and should be <strong>$rootFromScript</strong>");
345 345
         }
346 346
     }
347 347
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
         if (count($probeReturns) == 0) {
363 363
             $this->storeTestResult(common\Entity::L_OK, "All configured RADIUS/UDP probes are reachable.");
364 364
         } else {
365
-            $this->storeTestResult(common\Entity::L_ERROR, "The following RADIUS probes are NOT reachable: " . implode(', ', $probeReturns));
365
+            $this->storeTestResult(common\Entity::L_ERROR, "The following RADIUS probes are NOT reachable: ".implode(', ', $probeReturns));
366 366
         }
367 367
     }
368 368
 
@@ -380,9 +380,9 @@  discard block
 block discarded – undo
380 380
             $SSPconfig = \SimpleSAML\Configuration::getInstance();
381 381
             $sspVersion = explode('.', $SSPconfig->getVersion());
382 382
             if ((int) $sspVersion[0] >= $this->needversionSSP['major'] && (int) $sspVersion[1] >= $this->needversionSSP['minor']) {
383
-                $this->storeTestResult(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficently recent. You are running " . implode('.', $sspVersion));
383
+                $this->storeTestResult(\core\common\Entity::L_OK, "<strong>simpleSAMLphp</strong> is sufficently recent. You are running ".implode('.', $sspVersion));
384 384
             } else {
385
-                $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least " . implode('.', $this->needversionSSP));
385
+                $this->storeTestResult(\core\common\Entity::L_ERROR, "<strong>simpleSAMLphp</strong> is too old. We need at least ".implode('.', $this->needversionSSP));
386 386
             }
387 387
         }
388 388
     }
@@ -440,8 +440,8 @@  discard block
 block discarded – undo
440 440
      */
441 441
     private function testLogdir()
442 442
     {
443
-        if (fopen(\config\Master::PATHS['logdir'] . "/debug.log", "a") == FALSE) {
444
-            $this->storeTestResult(\core\common\Entity::L_WARN, "Log files in <strong>" . \config\Master::PATHS['logdir'] . "</strong> are not writable!");
443
+        if (fopen(\config\Master::PATHS['logdir']."/debug.log", "a") == FALSE) {
444
+            $this->storeTestResult(\core\common\Entity::L_WARN, "Log files in <strong>".\config\Master::PATHS['logdir']."</strong> are not writable!");
445 445
         } else {
446 446
             $this->storeTestResult(\core\common\Entity::L_OK, "Log directory is writable.");
447 447
         }
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
         }
474 474
 
475 475
         $classname = 'Imagick';
476
-        if (class_exists('\\' . $classname)) {
476
+        if (class_exists('\\'.$classname)) {
477 477
             $this->storeTestResult(\core\common\Entity::L_OK, "PHP extension <strong>Imagick</strong> is installed.");
478 478
         } else {
479 479
             $this->storeTestResult(\core\common\Entity::L_ERROR, "PHP extension <strong>Imagick</strong> not found! Get it from your distribution or <a href='http://pecl.php.net/package/imagick'>here</a>.");
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
     {
570 570
         $A = $this->getExecPath('openssl');
571 571
         if ($A['exec'] != "") {
572
-            $t = exec($A['exec'] . ' version');
572
+            $t = exec($A['exec'].' version');
573 573
             if ($A['exec_is'] == "EXPLICIT") {
574 574
                 $this->storeTestResult(\core\common\Entity::L_OK, "<strong>$t</strong> was found and is configured explicitly in your config.");
575 575
             } else {
@@ -597,14 +597,14 @@  discard block
 block discarded – undo
597 597
         }
598 598
         $A = $this->getExecPath('makensis');
599 599
         if ($A['exec'] != "") {
600
-            $t = exec($A['exec'] . ' -VERSION');
600
+            $t = exec($A['exec'].' -VERSION');
601 601
             if ($A['exec_is'] == "EXPLICIT") {
602 602
                 $this->storeTestResult(\core\common\Entity::L_OK, "<strong>makensis $t</strong> was found and is configured explicitly in your config.");
603 603
             } else {
604 604
                 $this->storeTestResult(\core\common\Entity::L_WARN, "<strong>makensis $t</strong> was found, but is not configured with an absolute path in your config.");
605 605
             }
606 606
             $outputArray = [];
607
-            exec($A['exec'] . ' -HELP', $outputArray);
607
+            exec($A['exec'].' -HELP', $outputArray);
608 608
             $t1 = count(preg_grep('/INPUTCHARSET/', $outputArray));
609 609
             if ($t1 == 1 && \config\ConfAssistant::NSIS_VERSION == 2) {
610 610
                 $this->storeTestResult(\core\common\Entity::L_ERROR, "Declared NSIS_VERSION does not seem to match the file pointed to by PATHS['makensis']!");
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
         $NSIS_Module_status = [];
635 635
         foreach ($this->NSISModules as $module) {
636 636
             unset($out);
637
-            exec(\config\ConfAssistant::PATHS['makensis'] . " -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval);
637
+            exec(\config\ConfAssistant::PATHS['makensis']." -V1 '-X!include $module' '-XOutFile $exe' '-XSection X' '-XSectionEnd'", $out, $retval);
638 638
             if ($retval > 0) {
639 639
                 $NSIS_Module_status[$module] = 0;
640 640
             } else {
@@ -701,8 +701,8 @@  discard block
 block discarded – undo
701 701
         $locales = shell_exec("locale -a");
702 702
         $allthere = "";
703 703
         foreach (\config\Master::LANGUAGES as $onelanguage) {
704
-            if (preg_match("/" . $onelanguage['locale'] . "/", $locales) == 0) {
705
-                $allthere .= $onelanguage['locale'] . " ";
704
+            if (preg_match("/".$onelanguage['locale']."/", $locales) == 0) {
705
+                $allthere .= $onelanguage['locale']." ";
706 706
             }
707 707
         }
708 708
         if ($allthere == "") {
@@ -716,47 +716,47 @@  discard block
 block discarded – undo
716 716
         ["SETTING" => \config\Master::APPEARANCE['from-mail'],
717 717
             "DEFVALUE" => "[email protected]",
718 718
             "COMPLAINTSTRING" => "APPEARANCE/from-mail ",
719
-            "REQUIRED" => FALSE,],
719
+            "REQUIRED" => FALSE, ],
720 720
         ["SETTING" => \config\Master::APPEARANCE['support-contact']['url'],
721 721
             "DEFVALUE" => "[email protected]?body=Only%20English%20language%20please!",
722 722
             "COMPLAINTSTRING" => "APPEARANCE/support-contact/url ",
723
-            "REQUIRED" => FALSE,],
723
+            "REQUIRED" => FALSE, ],
724 724
         ["SETTING" => \config\Master::APPEARANCE['support-contact']['display'],
725 725
             "DEFVALUE" => "[email protected]",
726 726
             "COMPLAINTSTRING" => "APPEARANCE/support-contact/display ",
727
-            "REQUIRED" => FALSE,],
727
+            "REQUIRED" => FALSE, ],
728 728
         ["SETTING" => \config\Master::APPEARANCE['support-contact']['developer-mail'],
729 729
             "DEFVALUE" => "[email protected]",
730 730
             "COMPLAINTSTRING" => "APPEARANCE/support-contact/mail ",
731
-            "REQUIRED" => FALSE,],
731
+            "REQUIRED" => FALSE, ],
732 732
         ["SETTING" => \config\Master::APPEARANCE['abuse-mail'],
733 733
             "DEFVALUE" => "[email protected]",
734 734
             "COMPLAINTSTRING" => "APPEARANCE/abuse-mail ",
735
-            "REQUIRED" => FALSE,],
735
+            "REQUIRED" => FALSE, ],
736 736
         ["SETTING" => \config\Master::APPEARANCE['MOTD'],
737 737
             "DEFVALUE" => "Release Candidate. All bugs to be shot on sight!",
738 738
             "COMPLAINTSTRING" => "APPEARANCE/MOTD ",
739
-            "REQUIRED" => FALSE,],
739
+            "REQUIRED" => FALSE, ],
740 740
         ["SETTING" => \config\Master::APPEARANCE['webcert_CRLDP'],
741 741
             "DEFVALUE" => ['list', 'of', 'CRL', 'pointers'],
742 742
             "COMPLAINTSTRING" => "APPEARANCE/webcert_CRLDP ",
743
-            "REQUIRED" => TRUE,],
743
+            "REQUIRED" => TRUE, ],
744 744
         ["SETTING" => \config\Master::APPEARANCE['webcert_OCSP'],
745 745
             "DEFVALUE" => ['list', 'of', 'OCSP', 'pointers'],
746 746
             "COMPLAINTSTRING" => "APPEARANCE/webcert_OCSP ",
747
-            "REQUIRED" => TRUE,],
747
+            "REQUIRED" => TRUE, ],
748 748
         ["SETTING" => \config\Master::DB['INST']['host'],
749 749
             "DEFVALUE" => "db.host.example",
750 750
             "COMPLAINTSTRING" => "DB/INST ",
751
-            "REQUIRED" => TRUE,],
751
+            "REQUIRED" => TRUE, ],
752 752
         ["SETTING" => \config\Master::DB['INST']['host'],
753 753
             "DEFVALUE" => "db.host.example",
754 754
             "COMPLAINTSTRING" => "DB/USER ",
755
-            "REQUIRED" => TRUE,],
755
+            "REQUIRED" => TRUE, ],
756 756
         ["SETTING" => \config\Master::DB['EXTERNAL']['host'],
757 757
             "DEFVALUE" => "customerdb.otherhost.example",
758 758
             "COMPLAINTSTRING" => "DB/EXTERNAL ",
759
-            "REQUIRED" => FALSE,],
759
+            "REQUIRED" => FALSE, ],
760 760
     ];
761 761
 
762 762
     /**
@@ -785,11 +785,11 @@  discard block
 block discarded – undo
785 785
         if (isset(\config\Diagnostics::RADIUSTESTS['TLS-clientcerts'])) {
786 786
             foreach (\config\Diagnostics::RADIUSTESTS['TLS-clientcerts'] as $cadata) {
787 787
                 foreach ($cadata['certificates'] as $cert_files) {
788
-                    if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['public']) === FALSE) {
789
-                        $defaultvalues .= "CERTIFICATE/" . $cert_files['public'] . " ";
788
+                    if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['public']) === FALSE) {
789
+                        $defaultvalues .= "CERTIFICATE/".$cert_files['public']." ";
790 790
                     }
791
-                    if (file_get_contents(ROOT . "/config/cli-certs/" . $cert_files['private']) === FALSE) {
792
-                        $defaultvalues .= "CERTIFICATE/" . $cert_files['private'] . " ";
791
+                    if (file_get_contents(ROOT."/config/cli-certs/".$cert_files['private']) === FALSE) {
792
+                        $defaultvalues .= "CERTIFICATE/".$cert_files['private']." ";
793 793
                     }
794 794
                 }
795 795
             }
@@ -882,14 +882,14 @@  discard block
 block discarded – undo
882 882
         if ($global_no_cache) {
883 883
             foreach ($Devs as $dev => $D) {
884 884
                 if (empty($D['options']['no_cache']) || $D['options']['no_cache'] != 0) {
885
-                    $no_cache_dev .= $dev . " ";
885
+                    $no_cache_dev .= $dev." ";
886 886
                     $no_cache_dev_count++;
887 887
                 }
888 888
             }
889 889
         } else {
890 890
             foreach ($Devs as $dev => $D) {
891 891
                 if (!empty($D['options']['no_cache']) && $D['options']['no_cache'] != 0) {
892
-                    $no_cache_dev .= $dev . " ";
892
+                    $no_cache_dev .= $dev." ";
893 893
                     $no_cache_dev_count++;
894 894
                 }
895 895
             }
@@ -928,13 +928,13 @@  discard block
 block discarded – undo
928 928
         $mail->isHTML(FALSE);
929 929
         $mail->CharSet = 'UTF-8';
930 930
         $mail->From = \config\Master::APPEARANCE['from-mail'];
931
-        $mail->FromName = \config\Master::APPEARANCE['productname'] . " Invitation System";
931
+        $mail->FromName = \config\Master::APPEARANCE['productname']." Invitation System";
932 932
         $mail->addAddress(\config\Master::APPEARANCE['abuse-mail']);
933 933
         $mail->Subject = "testing CAT configuration mail";
934 934
         $mail->Body = "Testing CAT mailing\n";
935 935
         $sent = $mail->send();
936 936
         if ($sent) {
937
-            $this->storeTestResult(\core\common\Entity::L_OK, "mailer settings appear to be working, check " . \config\Master::APPEARANCE['abuse-mail'] . " mailbox if the message was receiced.");
937
+            $this->storeTestResult(\core\common\Entity::L_OK, "mailer settings appear to be working, check ".\config\Master::APPEARANCE['abuse-mail']." mailbox if the message was receiced.");
938 938
         } else {
939 939
             $this->storeTestResult(\core\common\Entity::L_ERROR, "mailer settings failed, check the Config::MAILSETTINGS");
940 940
         }
Please login to merge, or discard this patch.
devices/apple_mobileconfig/MobileconfigSuperclass.php 1 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.