@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | protected function setSupportedEapMethods($eapArray) |
86 | 86 | { |
87 | 87 | $this->supportedEapMethods = $eapArray; |
88 | - $this->loggerInstance->debug(4, "This device (" . __CLASS__ . ") supports the following EAP methods: "); |
|
88 | + $this->loggerInstance->debug(4, "This device (".__CLASS__.") supports the following EAP methods: "); |
|
89 | 89 | $this->loggerInstance->debug(4, $this->supportedEapMethods); |
90 | 90 | } |
91 | 91 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | break 2; |
138 | 138 | } |
139 | 139 | } |
140 | - $longestSuffix = $candidate . $longestSuffix; |
|
140 | + $longestSuffix = $candidate.$longestSuffix; |
|
141 | 141 | } |
142 | 142 | return $longestSuffix; |
143 | 143 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | throw new Exception("No EAP type available."); |
176 | 176 | } |
177 | 177 | $this->attributes = $this->getProfileAttributes($profile); |
178 | - $this->deviceUUID = common\Entity::uuid('', 'CAT' . $profile->institution . "-" . $profile->identifier . "-" . $this->device_id); |
|
178 | + $this->deviceUUID = common\Entity::uuid('', 'CAT'.$profile->institution."-".$profile->identifier."-".$this->device_id); |
|
179 | 179 | |
180 | 180 | |
181 | 181 | // if we are instantiating a Silverbullet profile AND have been given |
@@ -200,8 +200,8 @@ discard block |
||
200 | 200 | // create temporary directory, its full path will be saved in $this->FPATH; |
201 | 201 | $tempDir = \core\common\Entity::createTemporaryDirectory($purpose); |
202 | 202 | $this->FPATH = $tempDir['dir']; |
203 | - mkdir($tempDir['dir'] . '/tmp'); |
|
204 | - chdir($tempDir['dir'] . '/tmp'); |
|
203 | + mkdir($tempDir['dir'].'/tmp'); |
|
204 | + chdir($tempDir['dir'].'/tmp'); |
|
205 | 205 | $caList = []; |
206 | 206 | $x509 = new \core\common\X509(); |
207 | 207 | if (isset($this->attributes['eap:ca_file'])) { |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | |
234 | 234 | $this->attributes['internal:consortia'] = $this->getConsortia(); |
235 | 235 | |
236 | - if (isset($this->attributes['media:openroaming']) && substr($this->attributes['media:openroaming'],0,6) == "always" ) { |
|
236 | + if (isset($this->attributes['media:openroaming']) && substr($this->attributes['media:openroaming'], 0, 6) == "always") { |
|
237 | 237 | $this->attributes['internal:openroaming'] = TRUE; |
238 | 238 | } |
239 | 239 | // alternatively: if DeviceConfig was called after a user hitting the |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | $this->support_url_substitute = sprintf(_("your local %s support page"), \config\ConfAssistant::CONSORTIUM['display_name']); |
251 | 251 | |
252 | 252 | if ($this->signer && $this->options['sign']) { |
253 | - $this->sign = ROOT . '/signer/' . $this->signer; |
|
253 | + $this->sign = ROOT.'/signer/'.$this->signer; |
|
254 | 254 | } |
255 | 255 | $this->installerBasename = $this->getInstallerBasename(); |
256 | 256 | common\Entity::outOfThePotatoes(); |
@@ -310,10 +310,10 @@ discard block |
||
310 | 310 | */ |
311 | 311 | protected function findSourceFile($file) |
312 | 312 | { |
313 | - if (is_file($this->module_path . '/Files/' . $this->device_id . '/' . $file)) { |
|
314 | - return $this->module_path . '/Files/' . $this->device_id . '/' . $file; |
|
315 | - } elseif (is_file($this->module_path . '/Files/' . $file)) { |
|
316 | - return $this->module_path . '/Files/' . $file; |
|
313 | + if (is_file($this->module_path.'/Files/'.$this->device_id.'/'.$file)) { |
|
314 | + return $this->module_path.'/Files/'.$this->device_id.'/'.$file; |
|
315 | + } elseif (is_file($this->module_path.'/Files/'.$file)) { |
|
316 | + return $this->module_path.'/Files/'.$file; |
|
317 | 317 | } else { |
318 | 318 | $this->loggerInstance->debug(2, "requested file $file does not exist\n"); |
319 | 319 | return FALSE; |
@@ -437,19 +437,19 @@ discard block |
||
437 | 437 | */ |
438 | 438 | private function getInstallerBasename() |
439 | 439 | { |
440 | - $baseName = $this->customTranslit(\config\ConfAssistant::CONSORTIUM['name']) . "-" . $this->getDeviceId(); |
|
440 | + $baseName = $this->customTranslit(\config\ConfAssistant::CONSORTIUM['name'])."-".$this->getDeviceId(); |
|
441 | 441 | if (isset($this->attributes['profile:customsuffix'][1])) { |
442 | 442 | // this string will end up as a filename on a filesystem, so always |
443 | 443 | // take a latin-based language variant if available |
444 | 444 | // and then scrub non-ASCII just in case |
445 | - return $baseName . $this->customTranslit($this->attributes['profile:customsuffix'][1]); |
|
445 | + return $baseName.$this->customTranslit($this->attributes['profile:customsuffix'][1]); |
|
446 | 446 | } |
447 | 447 | // Okay, no custom suffix. |
448 | 448 | // Use the configured inst name and apply shortening heuristics |
449 | 449 | // if an instshortname is set, base on that, otherwise, the normal instname |
450 | 450 | $attribToUse = (isset($this->attributes['general:instshortname']) ? 'general:instshortname' : 'general:instname'); |
451 | 451 | $lang_pointer = \config\Master::LANGUAGES[$this->languageInstance->getLang()]['latin_based'] == TRUE ? 0 : 1; |
452 | - $this->loggerInstance->debug(5, "getInstallerBasename1:" . $this->attributes[$attribToUse][$lang_pointer] . "\n"); |
|
452 | + $this->loggerInstance->debug(5, "getInstallerBasename1:".$this->attributes[$attribToUse][$lang_pointer]."\n"); |
|
453 | 453 | $inst = $this->customTranslit($this->attributes[$attribToUse][$lang_pointer]); |
454 | 454 | $this->loggerInstance->debug(4, "getInstallerBasename2:$inst\n"); |
455 | 455 | $Inst_a = explode('_', $inst); |
@@ -464,10 +464,10 @@ discard block |
||
464 | 464 | if (!empty($this->attributes['profile:name']) && !empty($this->attributes['profile:name'][$lang_pointer])) { |
465 | 465 | $profTemp = $this->customTranslit($this->attributes['profile:name'][$lang_pointer]); |
466 | 466 | $prof = preg_replace('/_+$/', '', $profTemp); |
467 | - return $baseName . $inst . '-' . $prof; |
|
467 | + return $baseName.$inst.'-'.$prof; |
|
468 | 468 | } |
469 | 469 | } |
470 | - return $baseName . $inst; |
|
470 | + return $baseName.$inst; |
|
471 | 471 | } |
472 | 472 | |
473 | 473 | /** |
@@ -653,7 +653,7 @@ discard block |
||
653 | 653 | $ext = 'unsupported'; |
654 | 654 | } |
655 | 655 | $this->loggerInstance->debug(5, "saveLogoFile: $mime : $ext\n"); |
656 | - $fileName = 'logo-' . $type . $iterator . '.' . $ext; |
|
656 | + $fileName = 'logo-'.$type.$iterator.'.'.$ext; |
|
657 | 657 | $fileHandle = fopen($fileName, "w"); |
658 | 658 | if (!$fileHandle) { |
659 | 659 | $this->loggerInstance->debug(2, "saveLogoFile failed for: $fileName\n"); |
@@ -680,13 +680,13 @@ discard block |
||
680 | 680 | $mime = $finfo->buffer($blob); |
681 | 681 | $ext = isset($this->mime_extensions[$mime]) ? $this->mime_extensions[$mime] : 'usupported'; |
682 | 682 | $this->loggerInstance->debug(5, "saveInfoFile: $mime : $ext\n"); |
683 | - $fileHandle = fopen('local-info.' . $ext, "w"); |
|
683 | + $fileHandle = fopen('local-info.'.$ext, "w"); |
|
684 | 684 | if ($fileHandle === FALSE) { |
685 | 685 | throw new Exception("problem opening the file"); |
686 | 686 | } |
687 | 687 | fwrite($fileHandle, $blob); |
688 | 688 | fclose($fileHandle); |
689 | - return(['name' => 'local-info.' . $ext, 'mime' => $ext]); |
|
689 | + return(['name' => 'local-info.'.$ext, 'mime' => $ext]); |
|
690 | 690 | } |
691 | 691 | |
692 | 692 | /** |
@@ -740,9 +740,9 @@ discard block |
||
740 | 740 | { |
741 | 741 | $outerId = NULL; |
742 | 742 | if (isset($this->attributes['internal:use_anon_outer']) && $this->attributes['internal:use_anon_outer'][0] == "1" && isset($this->attributes['internal:realm'])) { |
743 | - $outerId = "@" . $this->attributes['internal:realm'][0]; |
|
743 | + $outerId = "@".$this->attributes['internal:realm'][0]; |
|
744 | 744 | if (isset($this->attributes['internal:anon_local_value'])) { |
745 | - $outerId = $this->attributes['internal:anon_local_value'][0] . $outerId; |
|
745 | + $outerId = $this->attributes['internal:anon_local_value'][0].$outerId; |
|
746 | 746 | } |
747 | 747 | } |
748 | 748 | return $outerId; |