@@ -106,7 +106,6 @@ discard block |
||
106 | 106 | * ["my.server.name"] => "my.server.name" |
107 | 107 | * ["foo.bar.de", "baz.bar.ge"] => "e" |
108 | 108 | * ["server1.example.com", "server2.example.com", "serverN.example.com"] => ".example.com" |
109 | - |
|
110 | 109 | * @return string |
111 | 110 | */ |
112 | 111 | public function longestNameSuffix() { |
@@ -340,7 +339,6 @@ discard block |
||
340 | 339 | * |
341 | 340 | * @param string $format only "der" and "pem" are currently allowed |
342 | 341 | * @return array an array of arrays or empty array on error |
343 | - |
|
344 | 342 | */ |
345 | 343 | final protected function saveCertificateFiles($format) { |
346 | 344 | switch ($format) { |
@@ -83,7 +83,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -193,8 +193,8 @@ discard block |
||
193 | 193 | // create temporary directory, its full path will be saved in $this->FPATH; |
194 | 194 | $tempDir = $this->createTemporaryDirectory($purpose); |
195 | 195 | $this->FPATH = $tempDir['dir']; |
196 | - mkdir($tempDir['dir'] . '/tmp'); |
|
197 | - chdir($tempDir['dir'] . '/tmp'); |
|
196 | + mkdir($tempDir['dir'].'/tmp'); |
|
197 | + chdir($tempDir['dir'].'/tmp'); |
|
198 | 198 | $caList = []; |
199 | 199 | $x509 = new \core\common\X509(); |
200 | 200 | if (isset($this->attributes['eap:ca_file'])) { |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | $this->support_url_substitute = sprintf(_("your local %s support page"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
231 | 231 | |
232 | 232 | if ($this->signer && $this->options['sign']) { |
233 | - $this->sign = ROOT . '/signer/' . $this->signer; |
|
233 | + $this->sign = ROOT.'/signer/'.$this->signer; |
|
234 | 234 | } |
235 | 235 | $this->installerBasename = $this->getInstallerBasename(); |
236 | 236 | common\Entity::outOfThePotatoes(); |
@@ -286,10 +286,10 @@ discard block |
||
286 | 286 | * @return string|boolean the filename as found, with path, or FALSE if it does not exist |
287 | 287 | */ |
288 | 288 | protected function findSourceFile($file) { |
289 | - if (is_file($this->module_path . '/Files/' . $this->device_id . '/' . $file)) { |
|
290 | - return $this->module_path . '/Files/' . $this->device_id . '/' . $file; |
|
291 | - } elseif (is_file($this->module_path . '/Files/' . $file)) { |
|
292 | - return $this->module_path . '/Files/' . $file; |
|
289 | + if (is_file($this->module_path.'/Files/'.$this->device_id.'/'.$file)) { |
|
290 | + return $this->module_path.'/Files/'.$this->device_id.'/'.$file; |
|
291 | + } elseif (is_file($this->module_path.'/Files/'.$file)) { |
|
292 | + return $this->module_path.'/Files/'.$file; |
|
293 | 293 | } else { |
294 | 294 | $this->loggerInstance->debug(2, "requested file $file does not exist\n"); |
295 | 295 | return FALSE; |
@@ -410,17 +410,17 @@ discard block |
||
410 | 410 | */ |
411 | 411 | private function getInstallerBasename() { |
412 | 412 | |
413 | - $baseName = $this->customTranslit(CONFIG_CONFASSISTANT['CONSORTIUM']['name']) . "-" . $this->getDeviceId(); |
|
413 | + $baseName = $this->customTranslit(CONFIG_CONFASSISTANT['CONSORTIUM']['name'])."-".$this->getDeviceId(); |
|
414 | 414 | if (isset($this->attributes['profile:customsuffix'][1])) { |
415 | 415 | // this string will end up as a filename on a filesystem, so always |
416 | 416 | // take a latin-based language variant if available |
417 | 417 | // and then scrub non-ASCII just in case |
418 | - return $baseName . $this->customTranslit($this->attributes['profile:customsuffix'][1]); |
|
418 | + return $baseName.$this->customTranslit($this->attributes['profile:customsuffix'][1]); |
|
419 | 419 | } |
420 | 420 | // Okay, no custom suffix. |
421 | 421 | // Use the configured inst name and apply shortening heuristics |
422 | 422 | $lang_pointer = CONFIG['LANGUAGES'][$this->languageInstance->getLang()]['latin_based'] == TRUE ? 0 : 1; |
423 | - $this->loggerInstance->debug(5, "getInstallerBasename1:" . $this->attributes['general:instname'][$lang_pointer] . "\n"); |
|
423 | + $this->loggerInstance->debug(5, "getInstallerBasename1:".$this->attributes['general:instname'][$lang_pointer]."\n"); |
|
424 | 424 | $inst = $this->customTranslit($this->attributes['general:instname'][$lang_pointer]); |
425 | 425 | $this->loggerInstance->debug(4, "getInstallerBasename2:$inst\n"); |
426 | 426 | $Inst_a = explode('_', $inst); |
@@ -435,10 +435,10 @@ discard block |
||
435 | 435 | if (!empty($this->attributes['profile:name']) && !empty($this->attributes['profile:name'][$lang_pointer])) { |
436 | 436 | $profTemp = $this->customTranslit($this->attributes['profile:name'][$lang_pointer]); |
437 | 437 | $prof = preg_replace('/_+$/', '', $profTemp); |
438 | - return $baseName . $inst . '-' . $prof; |
|
438 | + return $baseName.$inst.'-'.$prof; |
|
439 | 439 | } |
440 | 440 | } |
441 | - return $baseName . $inst; |
|
441 | + return $baseName.$inst; |
|
442 | 442 | } |
443 | 443 | |
444 | 444 | /** |
@@ -551,7 +551,7 @@ discard block |
||
551 | 551 | $ext = 'unsupported'; |
552 | 552 | } |
553 | 553 | $this->loggerInstance->debug(5, "saveLogoFile: $mime : $ext\n"); |
554 | - $fileName = 'logo-' . $type . $iterator . '.' . $ext; |
|
554 | + $fileName = 'logo-'.$type.$iterator.'.'.$ext; |
|
555 | 555 | $fileHandle = fopen($fileName, "w"); |
556 | 556 | if (!$fileHandle) { |
557 | 557 | $this->loggerInstance->debug(2, "saveLogoFile failed for: $fileName\n"); |
@@ -577,13 +577,13 @@ discard block |
||
577 | 577 | $mime = $finfo->buffer($blob); |
578 | 578 | $ext = isset($this->mime_extensions[$mime]) ? $this->mime_extensions[$mime] : 'usupported'; |
579 | 579 | $this->loggerInstance->debug(5, "saveInfoFile: $mime : $ext\n"); |
580 | - $fileHandle = fopen('local-info.' . $ext, "w"); |
|
580 | + $fileHandle = fopen('local-info.'.$ext, "w"); |
|
581 | 581 | if ($fileHandle === FALSE) { |
582 | 582 | throw new Exception("problem opening the file"); |
583 | 583 | } |
584 | 584 | fwrite($fileHandle, $blob); |
585 | 585 | fclose($fileHandle); |
586 | - return(['name' => 'local-info.' . $ext, 'mime' => $ext]); |
|
586 | + return(['name' => 'local-info.'.$ext, 'mime' => $ext]); |
|
587 | 587 | } |
588 | 588 | |
589 | 589 | /** |
@@ -634,9 +634,9 @@ discard block |
||
634 | 634 | protected function determineOuterIdString() { |
635 | 635 | $outerId = NULL; |
636 | 636 | if (isset($this->attributes['internal:use_anon_outer']) && $this->attributes['internal:use_anon_outer'][0] == "1" && isset($this->attributes['internal:realm'])) { |
637 | - $outerId = "@" . $this->attributes['internal:realm'][0]; |
|
637 | + $outerId = "@".$this->attributes['internal:realm'][0]; |
|
638 | 638 | if (isset($this->attributes['internal:anon_local_value'])) { |
639 | - $outerId = $this->attributes['internal:anon_local_value'][0] . $outerId; |
|
639 | + $outerId = $this->attributes['internal:anon_local_value'][0].$outerId; |
|
640 | 640 | } |
641 | 641 | } |
642 | 642 | return $outerId; |