Fixed step2 template

This commit is contained in:
Jan Böhmer 2025-09-21 19:30:49 +02:00
parent 710569daaf
commit 1d38c50abc
2 changed files with 29 additions and 20 deletions

View file

@ -24,12 +24,13 @@ namespace App\Services\InfoProviderSystem\DTOs;
use App\Entity\Parts\Part;
use Doctrine\ORM\EntityManagerInterface;
use Traversable;
/**
* Represents the complete response from a bulk info provider search operation.
* It contains a list of PartSearchResultDTOs, one for each part searched.
*/
readonly class BulkSearchResponseDTO implements \ArrayAccess
readonly class BulkSearchResponseDTO implements \ArrayAccess, \IteratorAggregate
{
/**
* @param BulkSearchPartResultsDTO[] $partResults Array of search results for each part
@ -216,4 +217,9 @@ readonly class BulkSearchResponseDTO implements \ArrayAccess
{
throw new \LogicException('BulkSearchResponseDTO is immutable.');
}
public function getIterator(): Traversable
{
return new \ArrayIterator($this->partResults);
}
}