Skip to content

Commit

Permalink
phpstan fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tischsoic committed Feb 22, 2024
1 parent 0dcf440 commit 46e94ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/Server/Input/Parser/FilterParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class FilterParser extends BaseParser
/**
* Parses input structure to a Query.
*
* @param array $data
* @param array<mixed> $data
* @param \Ibexa\Contracts\Rest\Input\ParsingDispatcher $parsingDispatcher
*
* @throws \Ibexa\Contracts\Rest\Exceptions\Parser
Expand Down Expand Up @@ -48,7 +48,7 @@ public function parse(array $data, ParsingDispatcher $parsingDispatcher): Filter
}

/**
* @param array $criteriaArray
* @param array<string, array<mixed>> $criteriaArray
* @param \Ibexa\Contracts\Rest\Input\ParsingDispatcher $parsingDispatcher
*
* @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion|null A criterion, or a LogicalAnd with a set of Criterion, or null if an empty array was given
Expand Down Expand Up @@ -91,7 +91,7 @@ public function dispatchCriterion($criterionName, $criterionData, ParsingDispatc
}
}

protected function getCriterionMediaType($criterionName)
protected function getCriterionMediaType(string $criterionName): string
{
return 'application/vnd.ibexa.api.internal.criterion.' . $criterionName;
}
Expand Down
10 changes: 10 additions & 0 deletions tests/bundle/Functional/SearchView/Criterion/IsContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@

final class IsContainerTest extends SearchCriterionTestCase
{
/**
* @phpstan-return iterable<
* string,
* array{
* string,
* string,
* int,
* },
* >
*/
public function getCriteriaPayloads(): iterable
{
return [
Expand Down

0 comments on commit 46e94ab

Please sign in to comment.