Skip to content

Commit

Permalink
Define result
Browse files Browse the repository at this point in the history
  • Loading branch information
mattamon committed Apr 16, 2024
1 parent b08c6d4 commit 69ebb59
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Service/GenericData/V1/DataObjectSearchAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@ public function __construct(
public function searchDataObjects(DataObjectQuery $dataObjectQuery): DataObjectSearchResult
{
$searchResult = $this->searchService->search($dataObjectQuery->getSearch());

$result = [];
foreach($searchResult->getIds() as $id) {
/** @var Concrete $dataObject */
$dataObject = $this->getDataObjectById($id);
if (!$dataObject) {
continue;
}
$result[] = new DataObject($dataObject->getId(), $dataObject->getClassName());
}

Expand Down

0 comments on commit 69ebb59

Please sign in to comment.