Skip to content
Snippets Groups Projects
Commit fc1ffee7 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Remove unnecessary method

parent 907d8385
No related branches found
No related tags found
No related merge requests found
...@@ -124,7 +124,7 @@ class MetaDataStorageHandlerFlatFile extends MetaDataStorageSource ...@@ -124,7 +124,7 @@ class MetaDataStorageHandlerFlatFile extends MetaDataStorageSource
// add the entity id of an entry to each entry in the metadata // add the entity id of an entry to each entry in the metadata
foreach ($metadataSet as $entityId => &$entry) { foreach ($metadataSet as $entityId => &$entry) {
$entry = $this->updateEntityID($set, $entityId, $entry); $entry['entityID'] = $entityId;
} }
$this->cachedMetadata[$set] = $metadataSet; $this->cachedMetadata[$set] = $metadataSet;
......
...@@ -129,7 +129,7 @@ class MetaDataStorageHandlerPdo extends MetaDataStorageSource ...@@ -129,7 +129,7 @@ class MetaDataStorageHandlerPdo extends MetaDataStorageSource
} }
foreach ($metadataSet as $entityId => &$entry) { foreach ($metadataSet as $entityId => &$entry) {
$entry = $this->updateEntityID($set, $entityId, $entry); $entry['entityID'] = $entityId;
} }
$this->cachedMetadata[$set] = $metadataSet; $this->cachedMetadata[$set] = $metadataSet;
......
...@@ -346,24 +346,4 @@ abstract class MetaDataStorageSource ...@@ -346,24 +346,4 @@ abstract class MetaDataStorageSource
throw new \Exception('Can not generate dynamic EntityID for metadata of this type: [' . $set . ']'); throw new \Exception('Can not generate dynamic EntityID for metadata of this type: [' . $set . ']');
} }
} }
/**
* Updates the metadata entry's entity id and returns the modified array.
* If it is explicit the entityid array key is updated to the entityId that was provided.
*
* @param string $metadataSet a metadata set (saml20-idp-hosted, saml20-sp-remote, etc)
* @param string $entityId the entity id we are modifying
* @param array $metadataEntry the fully populated metadata entry
* @return array modified metadata to include the valid entityid
*
* @throws \Exception
*/
protected function updateEntityID(string $metadataSet, string $entityId, array $metadataEntry): array
{
// set the entityid metadata array key to the provided entity id
$modifiedMetadataEntry = $metadataEntry;
$modifiedMetadataEntry['entityid'] = $entityId;
return $modifiedMetadataEntry;
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment