From d31c99200d03ffb92310a640983c314ddeb16e1f Mon Sep 17 00:00:00 2001 From: Robert Lange Date: Fri, 18 Oct 2024 11:48:16 +0200 Subject: [PATCH] refs vufind-org#2999 cleanup AbstractRecordCollection - order setResultSetIdentifier in methods like interface and use inheritdoc --- .../Response/AbstractRecordCollection.php | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/module/VuFindSearch/src/VuFindSearch/Response/AbstractRecordCollection.php b/module/VuFindSearch/src/VuFindSearch/Response/AbstractRecordCollection.php index ec5242c0228..dc3feaeca00 100644 --- a/module/VuFindSearch/src/VuFindSearch/Response/AbstractRecordCollection.php +++ b/module/VuFindSearch/src/VuFindSearch/Response/AbstractRecordCollection.php @@ -189,6 +189,16 @@ public function getSourceIdentifier() return $this->source; } + /** + * @inheritdoc + */ + public function setResultSetIdentifier(string $uuid) + { + foreach ($this->records as $record) { + $record->setResultSetIdentifier($uuid); + } + } + /** * Add a record to the collection. * @@ -297,21 +307,4 @@ public function count(): int { return count($this->records); } - - /** - * Sets the result set identifier for all records in the collection. - * - * This method assigns a given UUID to each record in the collection by calling - * the `setResultSetIdentifier` method on each record. - * - * @param string $uuid A valid UUID to be assigned to each record in the collection. - * - * @return void - */ - public function setResultSetIdentifier(string $uuid) - { - foreach ($this->records as $record) { - $record->setResultSetIdentifier($uuid); - } - } }