Test Setup Failed
Push — release_2_0 ( df098d...afd87c )
by Stefan
10:31
created
core/DeviceConfig.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     protected function setSupportedEapMethods($eapArray) {
85 85
         $this->supportedEapMethods = $eapArray;
86
-        $this->loggerInstance->debug(4, "This device (" . __CLASS__ . ") supports the following EAP methods: ");
86
+        $this->loggerInstance->debug(4, "This device (".__CLASS__.") supports the following EAP methods: ");
87 87
         $this->loggerInstance->debug(4, $this->supportedEapMethods);
88 88
     }
89 89
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                     break 2;
134 134
                 }
135 135
             }
136
-            $longestSuffix = $candidate . $longestSuffix;
136
+            $longestSuffix = $candidate.$longestSuffix;
137 137
         }
138 138
         return $longestSuffix;
139 139
     }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             throw new Exception("No EAP type available.");
170 170
         }
171 171
         $this->attributes = $this->getProfileAttributes($profile);
172
-        $this->deviceUUID = common\Entity::uuid('', 'CAT' . $profile->institution . "-" . $profile->identifier . "-" . $this->device_id);
172
+        $this->deviceUUID = common\Entity::uuid('', 'CAT'.$profile->institution."-".$profile->identifier."-".$this->device_id);
173 173
 
174 174
 
175 175
         // if we are instantiating a Silverbullet profile AND have been given
@@ -194,8 +194,8 @@  discard block
 block discarded – undo
194 194
         // create temporary directory, its full path will be saved in $this->FPATH;
195 195
         $tempDir = $this->createTemporaryDirectory($purpose);
196 196
         $this->FPATH = $tempDir['dir'];
197
-        mkdir($tempDir['dir'] . '/tmp');
198
-        chdir($tempDir['dir'] . '/tmp');
197
+        mkdir($tempDir['dir'].'/tmp');
198
+        chdir($tempDir['dir'].'/tmp');
199 199
         $caList = [];
200 200
         $x509 = new \core\common\X509();
201 201
         if (isset($this->attributes['eap:ca_file'])) {
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
         $this->support_url_substitute = sprintf(_("your local %s support page"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
232 232
 
233 233
         if ($this->signer && $this->options['sign']) {
234
-            $this->sign = ROOT . '/signer/' . $this->signer;
234
+            $this->sign = ROOT.'/signer/'.$this->signer;
235 235
         }
236 236
         $this->installerBasename = $this->getInstallerBasename();
237 237
         common\Entity::outOfThePotatoes();
@@ -287,10 +287,10 @@  discard block
 block discarded – undo
287 287
      * @return string|boolean the filename as found, with path, or FALSE if it does not exist
288 288
      */
289 289
     protected function findSourceFile($file) {
290
-        if (is_file($this->module_path . '/Files/' . $this->device_id . '/' . $file)) {
291
-            return $this->module_path . '/Files/' . $this->device_id . '/' . $file;
292
-        } elseif (is_file($this->module_path . '/Files/' . $file)) {
293
-            return $this->module_path . '/Files/' . $file;
290
+        if (is_file($this->module_path.'/Files/'.$this->device_id.'/'.$file)) {
291
+            return $this->module_path.'/Files/'.$this->device_id.'/'.$file;
292
+        } elseif (is_file($this->module_path.'/Files/'.$file)) {
293
+            return $this->module_path.'/Files/'.$file;
294 294
         } else {
295 295
             $this->loggerInstance->debug(2, "requested file $file does not exist\n");
296 296
             return FALSE;
@@ -411,19 +411,19 @@  discard block
 block discarded – undo
411 411
      */
412 412
     private function getInstallerBasename() {
413 413
 
414
-        $baseName = $this->customTranslit(CONFIG_CONFASSISTANT['CONSORTIUM']['name']) . "-" . $this->getDeviceId();
414
+        $baseName = $this->customTranslit(CONFIG_CONFASSISTANT['CONSORTIUM']['name'])."-".$this->getDeviceId();
415 415
         if (isset($this->attributes['profile:customsuffix'][1])) {
416 416
             // this string will end up as a filename on a filesystem, so always
417 417
             // take a latin-based language variant if available
418 418
             // and then scrub non-ASCII just in case
419
-            return $baseName . $this->customTranslit($this->attributes['profile:customsuffix'][1]);
419
+            return $baseName.$this->customTranslit($this->attributes['profile:customsuffix'][1]);
420 420
         }
421 421
         // Okay, no custom suffix. 
422 422
         // Use the configured inst name and apply shortening heuristics
423 423
         // if an instshortname is set, base on that, otherwise, the normal instname
424 424
         $attribToUse = (isset($this->attributes['general:instshortname']) ? 'general:instshortname' : 'general:instname');
425 425
         $lang_pointer = CONFIG['LANGUAGES'][$this->languageInstance->getLang()]['latin_based'] == TRUE ? 0 : 1;
426
-        $this->loggerInstance->debug(5, "getInstallerBasename1:" . $this->attributes[$attribToUse][$lang_pointer] . "\n");
426
+        $this->loggerInstance->debug(5, "getInstallerBasename1:".$this->attributes[$attribToUse][$lang_pointer]."\n");
427 427
         $inst = $this->customTranslit($this->attributes[$attribToUse][$lang_pointer]);
428 428
         $this->loggerInstance->debug(4, "getInstallerBasename2:$inst\n");
429 429
         $Inst_a = explode('_', $inst);
@@ -438,10 +438,10 @@  discard block
 block discarded – undo
438 438
             if (!empty($this->attributes['profile:name']) && !empty($this->attributes['profile:name'][$lang_pointer])) {
439 439
                 $profTemp = $this->customTranslit($this->attributes['profile:name'][$lang_pointer]);
440 440
                 $prof = preg_replace('/_+$/', '', $profTemp);
441
-                return $baseName . $inst . '-' . $prof;
441
+                return $baseName.$inst.'-'.$prof;
442 442
             }
443 443
         }
444
-        return $baseName . $inst;
444
+        return $baseName.$inst;
445 445
     }
446 446
 
447 447
     /**
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
                 $ext = 'unsupported';
555 555
             }
556 556
             $this->loggerInstance->debug(5, "saveLogoFile: $mime : $ext\n");
557
-            $fileName = 'logo-' . $type . $iterator . '.' . $ext;
557
+            $fileName = 'logo-'.$type.$iterator.'.'.$ext;
558 558
             $fileHandle = fopen($fileName, "w");
559 559
             if (!$fileHandle) {
560 560
                 $this->loggerInstance->debug(2, "saveLogoFile failed for: $fileName\n");
@@ -580,13 +580,13 @@  discard block
 block discarded – undo
580 580
         $mime = $finfo->buffer($blob);
581 581
         $ext = isset($this->mime_extensions[$mime]) ? $this->mime_extensions[$mime] : 'usupported';
582 582
         $this->loggerInstance->debug(5, "saveInfoFile: $mime : $ext\n");
583
-        $fileHandle = fopen('local-info.' . $ext, "w");
583
+        $fileHandle = fopen('local-info.'.$ext, "w");
584 584
         if ($fileHandle === FALSE) {
585 585
             throw new Exception("problem opening the file");
586 586
         }
587 587
         fwrite($fileHandle, $blob);
588 588
         fclose($fileHandle);
589
-        return(['name' => 'local-info.' . $ext, 'mime' => $ext]);
589
+        return(['name' => 'local-info.'.$ext, 'mime' => $ext]);
590 590
     }
591 591
 
592 592
     /**
@@ -637,9 +637,9 @@  discard block
 block discarded – undo
637 637
     protected function determineOuterIdString() {
638 638
         $outerId = NULL;
639 639
         if (isset($this->attributes['internal:use_anon_outer']) && $this->attributes['internal:use_anon_outer'][0] == "1" && isset($this->attributes['internal:realm'])) {
640
-            $outerId = "@" . $this->attributes['internal:realm'][0];
640
+            $outerId = "@".$this->attributes['internal:realm'][0];
641 641
             if (isset($this->attributes['internal:anon_local_value'])) {
642
-                $outerId = $this->attributes['internal:anon_local_value'][0] . $outerId;
642
+                $outerId = $this->attributes['internal:anon_local_value'][0].$outerId;
643 643
             }
644 644
         }
645 645
         return $outerId;
Please login to merge, or discard this patch.