Skip to content

Commit

Permalink
refs vufind-org#2999 cleanup AbstractRecordCollection - order setResu…
Browse files Browse the repository at this point in the history
…ltSetIdentifier in methods like interface and use inheritdoc
  • Loading branch information
RLangeUni committed Oct 18, 2024
1 parent 87480db commit d31c992
Showing 1 changed file with 10 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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);
}
}
}

0 comments on commit d31c992

Please sign in to comment.