| @@ -80,7 +80,7 @@ discard block | ||
| 80 | 80 | * user is a federation administrator of *any* federation. When given a parameter (ISO shortname of federation), it checks | 
| 81 | 81 | * if the user administers this particular federation. | 
| 82 | 82 | * | 
| 83 | - * @param string $federation optional: federation to be checked | |
| 83 | + * @param integer $federation optional: federation to be checked | |
| 84 | 84 | * @return boolean TRUE if the user is federation admin, FALSE if not | 
| 85 | 85 | */ | 
| 86 | 86 |      public function isFederationAdmin($federation = 0) { | 
| @@ -124,6 +124,9 @@ discard block | ||
| 124 | 124 | return FALSE; | 
| 125 | 125 | } | 
| 126 | 126 | |
| 127 | + /** | |
| 128 | + * @param string $content | |
| 129 | + */ | |
| 127 | 130 |      public function sendMailToUser($subject, $content) { | 
| 128 | 131 |          $mailaddr = $this->getAttributes("user:email"); | 
| 129 | 132 |          if (count($mailaddr) == 0) { // we don't know user's mail address | 
| @@ -206,8 +206,7 @@ | ||
| 206 | 206 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "accountstatus/"); | 
| 207 | 207 |          } elseif (strrpos($_SERVER['PHP_SELF'], "diag/")) { | 
| 208 | 208 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "diag/"); | 
| 209 | - } | |
| 210 | -            else { | |
| 209 | +        } else { | |
| 211 | 210 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "/"); | 
| 212 | 211 | } | 
| 213 | 212 | |
| @@ -125,6 +125,7 @@ discard block | ||
| 125 | 125 | * | 
| 126 | 126 | * @param string $device | 
| 127 | 127 | * @param AbstractProfile $profile | 
| 128 | + * @param string $generatedFor | |
| 128 | 129 | * @return array info about the new installer (mime and link) | 
| 129 | 130 | */ | 
| 130 | 131 |      private function generateNewInstaller($device, $profile, $generatedFor, $token, $password) { | 
| @@ -459,6 +460,10 @@ discard block | ||
| 459 | 460 | readfile($file); | 
| 460 | 461 | } | 
| 461 | 462 | |
| 463 | + /** | |
| 464 | + * @param string $destFile | |
| 465 | + * @param integer $resize | |
| 466 | + */ | |
| 462 | 467 |      private function processImage($inputImage, $destFile, $width, $height, $resize) { | 
| 463 | 468 | $info = new \finfo(); | 
| 464 | 469 | $filetype = $info->buffer($inputImage, FILEINFO_MIME_TYPE); | 
| @@ -485,7 +490,6 @@ discard block | ||
| 485 | 490 | * When called for DiscoJuice, first check if file cache exists | 
| 486 | 491 | * If not then generate the file and save it in the cache | 
| 487 | 492 | * @param int $idp IdP identifier | 
| 488 | - * @param int $disco flag turning on image generation for DiscoJuice | |
| 489 | 493 | * @param int $width maximum width of the generated image | 
| 490 | 494 | * @param int $height maximum height of the generated image | 
| 491 | 495 | * if one of these is 0 then it is treated as no upper bound | 
| @@ -260,6 +260,9 @@ discard block | ||
| 260 | 260 |          return _("Sorry, this should not happen - no additional information is available"); | 
| 261 | 261 | } | 
| 262 | 262 | |
| 263 | + /** | |
| 264 | + * @param string $file | |
| 265 | + */ | |
| 263 | 266 |      private function findSourceFile($file) { | 
| 264 | 267 |          if (is_file($this->module_path . '/Files/' . $this->device_id . '/' . $file)) { | 
| 265 | 268 | return $this->module_path . '/Files/' . $this->device_id . '/' . $file; | 
| @@ -540,6 +543,9 @@ discard block | ||
| 540 | 543 | 'application/pdf' => 'pdf', | 
| 541 | 544 | ]; | 
| 542 | 545 | |
| 546 | + /** | |
| 547 | + * @param string $type | |
| 548 | + */ | |
| 543 | 549 |      private function saveLogoFile($logos,$type) { | 
| 544 | 550 | $iterator = 0; | 
| 545 | 551 | $returnarray = []; | 
| @@ -205,7 +205,7 @@ | ||
| 205 | 205 | * @param int $rowid the HTML field base name of the option to be displayed | 
| 206 | 206 | * @param string $optionName the name of the option to display | 
| 207 | 207 | * @param string $optionValue the value of the option to display | 
| 208 | - * @param mixed $optionLang the language of the option to display | |
| 208 | + * @param null|string $optionLang the language of the option to display | |
| 209 | 209 | * @return string HTML code | 
| 210 | 210 | * @throws Exception | 
| 211 | 211 | */ | 
| @@ -124,8 +124,7 @@ | ||
| 124 | 124 | $out .= "Config.eap_inner = '" . $eapMethod['INNER'] . "'\n"; | 
| 125 | 125 |          if ($this->selectedEap == \core\common\EAP::EAPTYPE_TLS && isset($this->attributes['eap-specific:tls_use_other_id']) && $this->attributes['eap-specific:tls_use_other_id'][0] == 'on') { | 
| 126 | 126 | $out .= "Config.use_other_tls_id = True\n"; | 
| 127 | - } | |
| 128 | -        else { | |
| 127 | +        } else { | |
| 129 | 128 | $out .= "Config.use_other_tls_id = False\n"; | 
| 130 | 129 | } | 
| 131 | 130 | $tou = $this->mkUserConsent(); | 
| @@ -96,6 +96,12 @@ | ||
| 96 | 96 | */ | 
| 97 | 97 | protected $frontendHandle; | 
| 98 | 98 | |
| 99 | + /** | |
| 100 | + * @param integer $idpIdentifier | |
| 101 | + * @param string $deviceId | |
| 102 | + * @param string $area | |
| 103 | + * @param string $lang | |
| 104 | + */ | |
| 99 | 105 |      protected function saveDownloadDetails($idpIdentifier, $profileId, $deviceId, $area, $lang, $eapType) { | 
| 100 | 106 |          if (CONFIG['PATHS']['logdir']) { | 
| 101 | 107 | $file = fopen(CONFIG['PATHS']['logdir'] . "/download_details.log", "a"); | 
| @@ -56,6 +56,9 @@ discard block | ||
| 56 | 56 | |
| 57 | 57 | const PRODUCTNAME = "Managed IdP"; | 
| 58 | 58 | |
| 59 | + /** | |
| 60 | + * @param integer $length | |
| 61 | + */ | |
| 59 | 62 | public static function randomString( | 
| 60 | 63 | $length, $keyspace = '23456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | 
| 61 | 64 |      ) { | 
| @@ -238,6 +241,7 @@ discard block | ||
| 238 | 241 | /** | 
| 239 | 242 | * create a CSR | 
| 240 | 243 | * | 
| 244 | + * @param resource $privateKey | |
| 241 | 245 | * @return | 
| 242 | 246 | */ | 
| 243 | 247 |      private function generateCsr($privateKey) { | 
| @@ -277,6 +281,7 @@ discard block | ||
| 277 | 281 | * take a CSR and sign it with our issuing CA's certificate | 
| 278 | 282 | * | 
| 279 | 283 | * @param mixed $csr the CSR | 
| 284 | + * @param integer $expiryDays | |
| 280 | 285 | */ | 
| 281 | 286 |      private function signCsr($csr, $expiryDays) { | 
| 282 | 287 |          switch (CONFIG_CONFASSISTANT['SILVERBULLET']['CA']['type']) { |