Skip to content

Commit

Permalink
Add type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
mattamon committed Apr 16, 2024
1 parent 1a91973 commit b08c6d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Service/GenericData/V1/DataObjectSearchAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Pimcore\Bundle\StudioApiBundle\Dto\DataObject;
use Pimcore\Bundle\StudioApiBundle\Service\DataObjectSearchResult;
use Pimcore\Bundle\StudioApiBundle\Service\GenericData\DataObjectSearchAdapterInterface;
use Pimcore\Model\DataObject\Concrete;
use Pimcore\Model\Element\ElementInterface;

final readonly class DataObjectSearchAdapter implements DataObjectSearchAdapterInterface
Expand All @@ -36,6 +37,7 @@ public function searchDataObjects(DataObjectQuery $dataObjectQuery): DataObjectS
$searchResult = $this->searchService->search($dataObjectQuery->getSearch());

foreach($searchResult->getIds() as $id) {
/** @var Concrete $dataObject */
$dataObject = $this->getDataObjectById($id);
if (!$dataObject) {

Check failure on line 42 in src/Service/GenericData/V1/DataObjectSearchAdapter.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (8.2, highest, 11.x-dev as 11.99.9, true)

Negated boolean expression is always false.
continue;
Expand Down

0 comments on commit b08c6d4

Please sign in to comment.