if ($result instanceof EntitySearchResult
) { return $result;
} if ($result instanceof EntityCollection
) { /** @var TEntityCollection $result */
return new EntitySearchResult($this->
getDummyEntityName(),
$result->
count(),
$result, null,
$criteria,
$context);
} if ($result instanceof AggregationResultCollection
) { /** @var TEntityCollection $collection */
$collection =
new EntityCollection();
return new EntitySearchResult($this->
getDummyEntityName(), 0,
$collection,
$result,
$criteria,
$context);
} throw new \
RuntimeException('Invalid mock repository configuration'
);
} public function searchIds(Criteria
$criteria, Context
$context): IdSearchResult
{ $result = \
array_shift($this->searches
);
$callable =
$result;