| @@ -324,7 +324,6 @@ | ||
| 324 | 324 | * | 
| 325 | 325 | * @param string $format only "der" and "pem" are currently allowed | 
| 326 | 326 | * @return array an array of arrays or empty array on error | 
| 327 | - | |
| 328 | 327 | */ | 
| 329 | 328 |      final protected function saveCertificateFiles($format) { | 
| 330 | 329 |          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 | |
| @@ -117,7 +117,7 @@ discard block | ||
| 117 | 117 | continue 2; | 
| 118 | 118 | } | 
| 119 | 119 | } | 
| 120 | - $longestSuffix = $candidate . $longestSuffix; | |
| 120 | + $longestSuffix = $candidate.$longestSuffix; | |
| 121 | 121 | } | 
| 122 | 122 | return $longestSuffix; | 
| 123 | 123 | } | 
| @@ -153,7 +153,7 @@ discard block | ||
| 153 | 153 |              throw new Exception("No EAP type available."); | 
| 154 | 154 | } | 
| 155 | 155 | $this->attributes = $this->getProfileAttributes($profile); | 
| 156 | -        $this->deviceUUID = common\Entity::uuid('', 'CAT' . $profile->institution . "-" . $profile->identifier . "-" . $this->device_id); | |
| 156 | +        $this->deviceUUID = common\Entity::uuid('', 'CAT'.$profile->institution."-".$profile->identifier."-".$this->device_id); | |
| 157 | 157 | |
| 158 | 158 | |
| 159 | 159 | // if we are instantiating a Silverbullet profile AND have been given | 
| @@ -177,8 +177,8 @@ discard block | ||
| 177 | 177 | // create temporary directory, its full path will be saved in $this->FPATH; | 
| 178 | 178 | $tempDir = $this->createTemporaryDirectory($purpose); | 
| 179 | 179 | $this->FPATH = $tempDir['dir']; | 
| 180 | - mkdir($tempDir['dir'] . '/tmp'); | |
| 181 | - chdir($tempDir['dir'] . '/tmp'); | |
| 180 | + mkdir($tempDir['dir'].'/tmp'); | |
| 181 | + chdir($tempDir['dir'].'/tmp'); | |
| 182 | 182 | $caList = []; | 
| 183 | 183 | $x509 = new \core\common\X509(); | 
| 184 | 184 |          if (isset($this->attributes['eap:ca_file'])) { | 
| @@ -214,7 +214,7 @@ discard block | ||
| 214 | 214 |          $this->support_url_substitute = sprintf(_("your local %s support page"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); | 
| 215 | 215 | |
| 216 | 216 |          if ($this->signer && $this->options['sign']) { | 
| 217 | - $this->sign = ROOT . '/signer/' . $this->signer; | |
| 217 | + $this->sign = ROOT.'/signer/'.$this->signer; | |
| 218 | 218 | } | 
| 219 | 219 | $this->installerBasename = $this->getInstallerBasename(); | 
| 220 | 220 | common\Entity::outOfThePotatoes(); | 
| @@ -270,10 +270,10 @@ discard block | ||
| 270 | 270 | * @return string|boolean the filename as found, with path, or FALSE if it does not exist | 
| 271 | 271 | */ | 
| 272 | 272 |      protected function findSourceFile($file) { | 
| 273 | -        if (is_file($this->module_path . '/Files/' . $this->device_id . '/' . $file)) { | |
| 274 | - return $this->module_path . '/Files/' . $this->device_id . '/' . $file; | |
| 275 | -        } elseif (is_file($this->module_path . '/Files/' . $file)) { | |
| 276 | - return $this->module_path . '/Files/' . $file; | |
| 273 | +        if (is_file($this->module_path.'/Files/'.$this->device_id.'/'.$file)) { | |
| 274 | + return $this->module_path.'/Files/'.$this->device_id.'/'.$file; | |
| 275 | +        } elseif (is_file($this->module_path.'/Files/'.$file)) { | |
| 276 | + return $this->module_path.'/Files/'.$file; | |
| 277 | 277 |          } else { | 
| 278 | 278 | $this->loggerInstance->debug(2, "requested file $file does not exist\n"); | 
| 279 | 279 | return FALSE; | 
| @@ -394,17 +394,17 @@ discard block | ||
| 394 | 394 | */ | 
| 395 | 395 |      private function getInstallerBasename() { | 
| 396 | 396 | |
| 397 | - $baseName = $this->customTranslit(CONFIG_CONFASSISTANT['CONSORTIUM']['name']) . "-" . $this->getDeviceId(); | |
| 397 | + $baseName = $this->customTranslit(CONFIG_CONFASSISTANT['CONSORTIUM']['name'])."-".$this->getDeviceId(); | |
| 398 | 398 |          if (isset($this->attributes['profile:customsuffix'][1])) { | 
| 399 | 399 | // this string will end up as a filename on a filesystem, so always | 
| 400 | 400 | // take a latin-based language variant if available | 
| 401 | 401 | // and then scrub non-ASCII just in case | 
| 402 | - return $baseName . $this->customTranslit($this->attributes['profile:customsuffix'][1]); | |
| 402 | + return $baseName.$this->customTranslit($this->attributes['profile:customsuffix'][1]); | |
| 403 | 403 | } | 
| 404 | 404 | // Okay, no custom suffix. | 
| 405 | 405 | // Use the configured inst name and apply shortening heuristics | 
| 406 | 406 | $lang_pointer = CONFIG['LANGUAGES'][$this->languageInstance->getLang()]['latin_based'] == TRUE ? 0 : 1; | 
| 407 | - $this->loggerInstance->debug(5, "getInstallerBasename1:" . $this->attributes['general:instname'][$lang_pointer] . "\n"); | |
| 407 | + $this->loggerInstance->debug(5, "getInstallerBasename1:".$this->attributes['general:instname'][$lang_pointer]."\n"); | |
| 408 | 408 | $inst = $this->customTranslit($this->attributes['general:instname'][$lang_pointer]); | 
| 409 | 409 | $this->loggerInstance->debug(4, "getInstallerBasename2:$inst\n"); | 
| 410 | 410 |          $Inst_a = explode('_', $inst); | 
| @@ -419,10 +419,10 @@ discard block | ||
| 419 | 419 |              if (!empty($this->attributes['profile:name']) && !empty($this->attributes['profile:name'][$lang_pointer])) { | 
| 420 | 420 | $profTemp = $this->customTranslit($this->attributes['profile:name'][$lang_pointer]); | 
| 421 | 421 |                  $prof = preg_replace('/_+$/', '', $profTemp); | 
| 422 | - return $baseName . $inst . '-' . $prof; | |
| 422 | + return $baseName.$inst.'-'.$prof; | |
| 423 | 423 | } | 
| 424 | 424 | } | 
| 425 | - return $baseName . $inst; | |
| 425 | + return $baseName.$inst; | |
| 426 | 426 | } | 
| 427 | 427 | |
| 428 | 428 | /** | 
| @@ -535,7 +535,7 @@ discard block | ||
| 535 | 535 | $ext = 'unsupported'; | 
| 536 | 536 | } | 
| 537 | 537 | $this->loggerInstance->debug(5, "saveLogoFile: $mime : $ext\n"); | 
| 538 | - $fileName = 'logo-' . $type . $iterator . '.' . $ext; | |
| 538 | + $fileName = 'logo-'.$type.$iterator.'.'.$ext; | |
| 539 | 539 | $fileHandle = fopen($fileName, "w"); | 
| 540 | 540 |              if (!$fileHandle) { | 
| 541 | 541 | $this->loggerInstance->debug(2, "saveLogoFile failed for: $fileName\n"); | 
| @@ -561,13 +561,13 @@ discard block | ||
| 561 | 561 | $mime = $finfo->buffer($blob); | 
| 562 | 562 | $ext = isset($this->mime_extensions[$mime]) ? $this->mime_extensions[$mime] : 'usupported'; | 
| 563 | 563 | $this->loggerInstance->debug(5, "saveInfoFile: $mime : $ext\n"); | 
| 564 | -        $fileHandle = fopen('local-info.' . $ext, "w"); | |
| 564 | +        $fileHandle = fopen('local-info.'.$ext, "w"); | |
| 565 | 565 |          if ($fileHandle === FALSE) { | 
| 566 | 566 |              throw new Exception("problem opening the file"); | 
| 567 | 567 | } | 
| 568 | 568 | fwrite($fileHandle, $blob); | 
| 569 | 569 | fclose($fileHandle); | 
| 570 | - return(['name' => 'local-info.' . $ext, 'mime' => $ext]); | |
| 570 | + return(['name' => 'local-info.'.$ext, 'mime' => $ext]); | |
| 571 | 571 | } | 
| 572 | 572 | |
| 573 | 573 | /** | 
| @@ -618,9 +618,9 @@ discard block | ||
| 618 | 618 |      protected function determineOuterIdString() { | 
| 619 | 619 | $outerId = NULL; | 
| 620 | 620 |          if (isset($this->attributes['internal:use_anon_outer']) && $this->attributes['internal:use_anon_outer'][0] == "1" && isset($this->attributes['internal:realm'])) { | 
| 621 | - $outerId = "@" . $this->attributes['internal:realm'][0]; | |
| 621 | + $outerId = "@".$this->attributes['internal:realm'][0]; | |
| 622 | 622 |              if (isset($this->attributes['internal:anon_local_value'])) { | 
| 623 | - $outerId = $this->attributes['internal:anon_local_value'][0] . $outerId; | |
| 623 | + $outerId = $this->attributes['internal:anon_local_value'][0].$outerId; | |
| 624 | 624 | } | 
| 625 | 625 | } | 
| 626 | 626 | return $outerId; |