From fc1ffee7388ae65289537ec1348d8b234068e50d Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Mon, 13 Jun 2022 17:13:11 +0200
Subject: [PATCH] Remove unnecessary method

---
 .../MetaDataStorageHandlerFlatFile.php        |  2 +-
 .../Metadata/MetaDataStorageHandlerPdo.php    |  2 +-
 .../Metadata/MetaDataStorageSource.php        | 20 -------------------
 3 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/src/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php b/src/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php
index 45bae1354..042dfa477 100644
--- a/src/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php
+++ b/src/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php
@@ -124,7 +124,7 @@ class MetaDataStorageHandlerFlatFile extends MetaDataStorageSource
 
         // add the entity id of an entry to each entry in the metadata
         foreach ($metadataSet as $entityId => &$entry) {
-            $entry = $this->updateEntityID($set, $entityId, $entry);
+            $entry['entityID'] = $entityId;
         }
 
         $this->cachedMetadata[$set] = $metadataSet;
diff --git a/src/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php b/src/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php
index 249d4a434..f84158433 100644
--- a/src/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php
+++ b/src/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php
@@ -129,7 +129,7 @@ class MetaDataStorageHandlerPdo extends MetaDataStorageSource
         }
 
         foreach ($metadataSet as $entityId => &$entry) {
-            $entry = $this->updateEntityID($set, $entityId, $entry);
+            $entry['entityID'] = $entityId;
         }
 
         $this->cachedMetadata[$set] = $metadataSet;
diff --git a/src/SimpleSAML/Metadata/MetaDataStorageSource.php b/src/SimpleSAML/Metadata/MetaDataStorageSource.php
index 6f2864ca9..b22b5aaef 100644
--- a/src/SimpleSAML/Metadata/MetaDataStorageSource.php
+++ b/src/SimpleSAML/Metadata/MetaDataStorageSource.php
@@ -346,24 +346,4 @@ abstract class MetaDataStorageSource
             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;
-    }
 }
-- 
GitLab