@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $dom = new \DOMDocument('1.0', 'utf-8'); |
| 145 | 145 | $root = $dom->createElement($rootname); |
| 146 | 146 | $dom->appendChild($root); |
| 147 | - $ns = $dom->createAttributeNS( 'http://www.w3.org/2001/XMLSchema-instance', 'xsi:noNamespaceSchemaLocation' ); |
|
| 147 | + $ns = $dom->createAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:noNamespaceSchemaLocation'); |
|
| 148 | 148 | $ns->value = "eap-metadata.xsd"; |
| 149 | 149 | $root->appendChild($ns); |
| 150 | 150 | $this->openRoamingToU = sprintf(_("I have read and agree to OpenRoaming Terms of Use at %s."), "https://wballiance.com/openroaming/toc-2020/"); |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | if ($netDefinition['condition'] === 'internal:openroaming' && |
| 182 | 182 | $this->attributes['internal:openroaming']) { |
| 183 | 183 | $this->setORtou(); |
| 184 | - if (preg_match("/^ask/",$this->attributes['media:openroaming'][0])) { |
|
| 184 | + if (preg_match("/^ask/", $this->attributes['media:openroaming'][0])) { |
|
| 185 | 185 | $orNetwork = $netDefinition; |
| 186 | 186 | continue; |
| 187 | 187 | } |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | private function setORtou() { |
| 241 | - if (preg_match("/preagreed/",$this->attributes['media:openroaming'][0])) { |
|
| 241 | + if (preg_match("/preagreed/", $this->attributes['media:openroaming'][0])) { |
|
| 242 | 242 | $this->addORtou = false; |
| 243 | 243 | } else { |
| 244 | 244 | $this->addORtou = true; |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | $authMethods = new \core\DeviceXMLmain(); |
| 263 | 263 | $authMethods->setChild('AuthenticationMethod', $this->authMethodsList); |
| 264 | 264 | $eapIdp->setChild('AuthenticationMethods', $authMethods); |
| 265 | - $eapIdp->setChild('CredentialApplicability', $this->getCredentialApplicability($ssids,$oids)); |
|
| 265 | + $eapIdp->setChild('CredentialApplicability', $this->getCredentialApplicability($ssids, $oids)); |
|
| 266 | 266 | // TODO $eap_idp->setChild('ValidUntil',$this->getValidUntil()); |
| 267 | 267 | $eapIdp->setChild('ProviderInfo', $this->providerInfo); |
| 268 | 268 | // TODO $eap_idp->setChild('VendorSpecific',$this->getVendorSpecific()); |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | $attr = $this->attributes; |
| 377 | 377 | if (isset($attr['general:logo_file'][0])) { |
| 378 | 378 | $rawLogoBlob = $attr['general:logo_file'][0]; |
| 379 | - $logoMime= $attr['internal:logo_file'][0]['mime']; |
|
| 379 | + $logoMime = $attr['internal:logo_file'][0]['mime']; |
|
| 380 | 380 | [$scaledBlob, $scaledMime] = $this->scaleLogo($rawLogoBlob, $logoMime); |
| 381 | 381 | if ($scaledMime == 'none') { |
| 382 | 382 | return NULL; |
@@ -404,8 +404,8 @@ discard block |
||
| 404 | 404 | */ |
| 405 | 405 | private function scaleLogo($blob, $mime) |
| 406 | 406 | { |
| 407 | - $maxByte = 1024*50; |
|
| 408 | - $maxPixelSize = [400,300,200,100]; |
|
| 407 | + $maxByte = 1024 * 50; |
|
| 408 | + $maxPixelSize = [400, 300, 200, 100]; |
|
| 409 | 409 | // start with the actual file size |
| 410 | 410 | $logoSize = strlen($blob); |
| 411 | 411 | \core\common\Logging::debug_s(4, $logoSize, "Logo file size: ", "\n"); |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | return ['', 'none']; |
| 428 | 428 | } |
| 429 | 429 | $imageSize = $imageObject->getImageGeometry(); |
| 430 | - \core\common\Logging::debug_s(4, $imageSize, "Input logo pixel size: ","\n"); |
|
| 430 | + \core\common\Logging::debug_s(4, $imageSize, "Input logo pixel size: ", "\n"); |
|
| 431 | 431 | foreach ($maxPixelSize as $size) { |
| 432 | 432 | $tmpImage = $imageObject; |
| 433 | 433 | $tmpImage->setImageFormat('PNG'); |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | $lng = $lngAttr['lang'] === 'any' ? \config\Master::APPEARANCE['defaultlocale'] : $lngAttr['lang']; |
| 478 | 478 | $tou .= "\n".$this->openRoamingToUArray[$lng]; |
| 479 | 479 | $touObj->setValue($tou); |
| 480 | - $out[] = $touObj; |
|
| 480 | + $out[] = $touObj; |
|
| 481 | 481 | } |
| 482 | 482 | } else { |
| 483 | 483 | $tou = $standardTou[0]; |