@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | namespace devices\xml; |
33 | 33 | use Exception; |
34 | -require_once dirname(__FILE__) . '/XML.inc.php'; |
|
34 | +require_once dirname(__FILE__).'/XML.inc.php'; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * This class implements full functionality of the generic XML device |
@@ -136,11 +136,11 @@ discard block |
||
136 | 136 | marshalObject($root, $eapIdp); |
137 | 137 | $dom = dom_import_simplexml($root)->ownerDocument; |
138 | 138 | //TODO schema validation makes sense so probably should be used |
139 | - if ($dom->schemaValidate(ROOT . '/devices/xml/eap-metadata.xsd') === FALSE) { |
|
139 | + if ($dom->schemaValidate(ROOT.'/devices/xml/eap-metadata.xsd') === FALSE) { |
|
140 | 140 | throw new Exception("Schema validation failed for eap-metadata"); |
141 | 141 | } |
142 | - file_put_contents($this->installerBasename . '.eap-config', $dom->saveXML()); |
|
143 | - return($this->installerBasename . '.eap-config'); |
|
142 | + file_put_contents($this->installerBasename.'.eap-config', $dom->saveXML()); |
|
143 | + return($this->installerBasename.'.eap-config'); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | private $AttributeNames = [ |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $this->loggerInstance->debug(4, "Missing class definition for $attrName\n"); |
167 | 167 | return([]); |
168 | 168 | } |
169 | - $className = "\devices\xml\\" . $this->AttributeNames[$attrName]; |
|
169 | + $className = "\devices\xml\\".$this->AttributeNames[$attrName]; |
|
170 | 170 | $objs = []; |
171 | 171 | if ($this->langScope === 'global') { |
172 | 172 | foreach ($attributeList['langs'] as $language => $value) { |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $displayname = new DisplayName(); |
198 | 198 | if (isset($profileNameLangs)) { |
199 | 199 | $langOrC = isset($profileNameLangs[$language]) ? $profileNameLangs[$language] : $profileNameLangs['C']; |
200 | - $value .= ' - ' . $langOrC; |
|
200 | + $value .= ' - '.$langOrC; |
|
201 | 201 | } |
202 | 202 | $displayname->setValue($value); |
203 | 203 | $displayname->setAttributes(['lang' => $language]); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | $displayname = new DisplayName(); |
208 | 208 | $value = $attr['general:instname'][0]; |
209 | 209 | if ($attr['internal:profile_count'][0] > 1) { |
210 | - $value .= ' - ' . $attr['profile:name'][0]; |
|
210 | + $value .= ' - '.$attr['profile:name'][0]; |
|
211 | 211 | } |
212 | 212 | $displayname->setValue($value); |
213 | 213 | $objs[] = $displayname; |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | $attr = $this->attributes; |
220 | 220 | if (isset($attr['general:logo_file'][0])) { |
221 | 221 | $logoString = base64_encode($attr['general:logo_file'][0]); |
222 | - $logoMime = 'image/' . $attr['internal:logo_file'][0]['mime']; |
|
222 | + $logoMime = 'image/'.$attr['internal:logo_file'][0]['mime']; |
|
223 | 223 | $providerlogo = new ProviderLogo(); |
224 | 224 | $providerlogo->setAttributes(['mime' => $logoMime, 'encoding' => 'base64']); |
225 | 225 | $providerlogo->setValue($logoString); |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | return ['inner_method' => 0, 'methodID' => $outerMethod, 'inner_methodID' => $inner['METHOD']]; |
344 | 344 | } else { |
345 | 345 | $innerauthmethod = new InnerAuthenticationMethod(); |
346 | - $typeOfInner = "\devices\xml\\" . ($inner["EAP"] ? 'EAPMethod' : 'NonEAPAuthMethod'); |
|
346 | + $typeOfInner = "\devices\xml\\".($inner["EAP"] ? 'EAPMethod' : 'NonEAPAuthMethod'); |
|
347 | 347 | $eapmethod = new $typeOfInner(); |
348 | 348 | $eaptype = new Type(); |
349 | 349 | $eaptype->setValue($inner['METHOD']); |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | return($serversidecredential); |
382 | 382 | } |
383 | 383 | |
384 | - private function setClientSideRealm ($clientsidecredential) { |
|
384 | + private function setClientSideRealm($clientsidecredential) { |
|
385 | 385 | $attr = $this->attributes; |
386 | 386 | $realm = \core\common\Entity::getAttributeValue($attr, 'internal:realm', 0); |
387 | 387 | if ($realm === NULL) { |