@@ -106,7 +106,7 @@ |
||
| 106 | 106 | /** @var \SimpleSAML\Module\cas\Auth\Source\CAS|null $source */ |
| 107 | 107 | $source = $this->authSource::getById($sourceId); |
| 108 | 108 | if ($source === null) { |
| 109 | - throw new Exception('Could not find authentication source with id ' . $sourceId); |
|
| 109 | + throw new Exception('Could not find authentication source with id '.$sourceId); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | $source->finalStep($state); |
@@ -183,13 +183,13 @@ |
||
| 183 | 183 | // array is empty or not set then an empty array will be returned. |
| 184 | 184 | $attributesFromQueryConfiguration = $this->parseQueryAttributes($dom); |
| 185 | 185 | if (!empty($attributesFromQueryConfiguration)) { |
| 186 | - // Overwrite attributes from parseAuthenticationSuccess with configured |
|
| 187 | - // XPath-based attributes, instead of combining them. |
|
| 186 | + // Overwrite attributes from parseAuthenticationSuccess with configured |
|
| 187 | + // XPath-based attributes, instead of combining them. |
|
| 188 | 188 | foreach ($attributesFromQueryConfiguration as $name => $values) { |
| 189 | - // Ensure a clean, unique list of string values |
|
| 189 | + // Ensure a clean, unique list of string values |
|
| 190 | 190 | $values = array_values(array_unique(array_map('strval', $values))); |
| 191 | 191 | |
| 192 | - // Configuration wins: replace any existing attribute with the same name |
|
| 192 | + // Configuration wins: replace any existing attribute with the same name |
|
| 193 | 193 | $attributes[$name] = $values; |
| 194 | 194 | } |
| 195 | 195 | } |
@@ -95,8 +95,8 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | $authsources = Configuration::loadFromArray($config); |
| 97 | 97 | |
| 98 | - $this->casConfig = (array)$authsources->getValue('cas'); |
|
| 99 | - $this->ldapConfig = (array)$authsources->getValue('ldap'); |
|
| 98 | + $this->casConfig = (array) $authsources->getValue('cas'); |
|
| 99 | + $this->ldapConfig = (array) $authsources->getValue('ldap'); |
|
| 100 | 100 | |
| 101 | 101 | if (isset($this->casConfig['serviceValidate'])) { |
| 102 | 102 | $this->validationMethod = 'serviceValidate'; |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | |
| 263 | 263 | $config = Configuration::loadFromArray( |
| 264 | 264 | $this->ldapConfig, |
| 265 | - 'Authentication source ' . var_export($this->authId, true), |
|
| 265 | + 'Authentication source '.var_export($this->authId, true), |
|
| 266 | 266 | ); |
| 267 | 267 | if (!empty($this->ldapConfig['servers'])) { |
| 268 | 268 | $ldap = new Ldap( |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | * 1: array<string, list<string>> |
| 347 | 347 | * } |
| 348 | 348 | */ |
| 349 | - private function parseAuthenticationSuccess(CasAuthnSuccess|SlateAuthnSuccess $message): array |
|
| 349 | + private function parseAuthenticationSuccess(CasAuthnSuccess | SlateAuthnSuccess $message): array |
|
| 350 | 350 | { |
| 351 | 351 | /** @var array<string, list<string>> $result */ |
| 352 | 352 | $result = []; |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | // Key selection rule |
| 374 | 374 | $key = ($prefix === '' || $prefix === 'cas') |
| 375 | 375 | ? $localName |
| 376 | - : ($prefix . ':' . $localName); |
|
| 376 | + : ($prefix.':'.$localName); |
|
| 377 | 377 | |
| 378 | 378 | $value = trim($xmlElement->textContent ?? ''); |
| 379 | 379 | |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | * @return void |
| 399 | 399 | */ |
| 400 | 400 | private function parseAuthenticationSuccessMetadata( |
| 401 | - CasAuthnSuccess|SlateAuthnSuccess $message, |
|
| 401 | + CasAuthnSuccess | SlateAuthnSuccess $message, |
|
| 402 | 402 | array &$attributes, |
| 403 | 403 | ): void { |
| 404 | 404 | if (!method_exists($message, 'getElements')) { |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | // and just localName when there is none. |
| 426 | 426 | $key = ($prefix === '') |
| 427 | 427 | ? $localName |
| 428 | - : ($prefix . ':' . $localName); |
|
| 428 | + : ($prefix.':'.$localName); |
|
| 429 | 429 | |
| 430 | 430 | $value = trim($element->getXML()->textContent ?? ''); |
| 431 | 431 | |