From b85a0dfc02c0859b4636c09fc42b3272da4506a1 Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Fri, 5 Jan 2018 00:17:48 +0100 Subject: [PATCH] PSR-2 --- modules/saml/hooks/hook_metadata_hosted.php | 53 ++++++++++----------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/modules/saml/hooks/hook_metadata_hosted.php b/modules/saml/hooks/hook_metadata_hosted.php index b2babd056..510a8133d 100644 --- a/modules/saml/hooks/hook_metadata_hosted.php +++ b/modules/saml/hooks/hook_metadata_hosted.php @@ -5,32 +5,31 @@ * * @param array &$metadataHosted The metadata links for hosted metadata on the frontpage. */ -function saml_hook_metadata_hosted(&$metadataHosted) { - assert(is_array($metadataHosted)); - - $sources = SimpleSAML_Auth_Source::getSourcesOfType('saml:SP'); - - foreach ($sources as $source) { - - $metadata = $source->getMetadata(); - - $name = $metadata->getValue('name', NULL); - if ($name === NULL) { - $name = $metadata->getValue('OrganizationDisplayName', NULL); - } - if ($name === NULL) { - $name = $source->getAuthID(); - } - - $md = array( - 'entityid' => $source->getEntityId(), - 'metadata-index' => $source->getEntityId(), - 'metadata-set' => 'saml20-sp-hosted', - 'metadata-url' => $source->getMetadataURL() . '?output=xhtml', - 'name' => $name, - ); - - $metadataHosted[] = $md; - } +function saml_hook_metadata_hosted(&$metadataHosted) { + assert(is_array($metadataHosted)); + + $sources = SimpleSAML_Auth_Source::getSourcesOfType('saml:SP'); + + foreach ($sources as $source) { + $metadata = $source->getMetadata(); + + $name = $metadata->getValue('name', null); + if ($name === null) { + $name = $metadata->getValue('OrganizationDisplayName', null); + } + if ($name === null) { + $name = $source->getAuthID(); + } + + $md = array( + 'entityid' => $source->getEntityId(), + 'metadata-index' => $source->getEntityId(), + 'metadata-set' => 'saml20-sp-hosted', + 'metadata-url' => $source->getMetadataURL() . '?output=xhtml', + 'name' => $name, + ); + + $metadataHosted[] = $md; + } } -- GitLab