diff --git a/lib/SimpleSAML/Utils/Config/Metadata.php b/lib/SimpleSAML/Utils/Config/Metadata.php index 0ef14d230d88ed7b5729a07a85ff8f2cdc9be002..1d34039cb64d94f92445a0606460731c026039b2 100644 --- a/lib/SimpleSAML/Utils/Config/Metadata.php +++ b/lib/SimpleSAML/Utils/Config/Metadata.php @@ -293,21 +293,21 @@ class Metadata if (is_string($nameIdPolicy)) { // handle old configurations where 'NameIDPolicy' was used to specify just the format - $policy = array('Format' => $nameIdPolicy); + $policy = ['Format' => $nameIdPolicy]; } elseif (is_array($nameIdPolicy)) { // handle current configurations specifying an array in the NameIDPolicy config option $nameIdPolicy_cf = \SimpleSAML_Configuration::loadFromArray($nameIdPolicy); - $policy = array( + $policy = [ 'Format' => $nameIdPolicy_cf->getString('Format', \SAML2\Constants::NAMEID_TRANSIENT), 'AllowCreate' => $nameIdPolicy_cf->getBoolean('AllowCreate', true), - ); + ]; $spNameQualifier = $nameIdPolicy_cf->getString('SPNameQualifier', false); if ($spNameQualifier !== false) { $policy['SPNameQualifier'] = $spNameQualifier; } } elseif ($nameIdPolicy === null) { // when NameIDPolicy is unset or set to null, default to transient as before - $policy = array('Format' => \SAML2\Constants::NAMEID_TRANSIENT); + $policy = ['Format' => \SAML2\Constants::NAMEID_TRANSIENT]; } return $policy; diff --git a/modules/saml/lib/Auth/Source/SP.php b/modules/saml/lib/Auth/Source/SP.php index 791fe76213a4a8bf94dc82245818645c80c188dd..ccb94d74802a9f1011c66df92baa568f8915159f 100644 --- a/modules/saml/lib/Auth/Source/SP.php +++ b/modules/saml/lib/Auth/Source/SP.php @@ -237,7 +237,7 @@ class SP extends Source } elseif (is_array($state['saml:NameIDPolicy'])) { $policy = $state['saml:NameIDPolicy']; } elseif ($state['saml:NameIDPolicy'] === null) { - $policy = array('Format' => \SAML2\Constants::NAMEID_TRANSIENT); + $policy = ['Format' => \SAML2\Constants::NAMEID_TRANSIENT]; } if ($policy !== null) { $ar->setNameIdPolicy($policy);