Skip to content

Commit

Permalink
[PHPDoc] Fixed PHPStan type-hints
Browse files Browse the repository at this point in the history
  • Loading branch information
alongosz committed Nov 19, 2024
1 parent 80a3c54 commit 6cd933c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/contracts/Values/Query/AbstractCriterionQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ abstract class AbstractCriterionQuery
{
public const int DEFAULT_LIMIT = 25;

/** @var TCriterion|null */
/** @phpstan-var TCriterion|null */
private ?CriterionInterface $query;

/** @var TSortClause[] */
/** @phpstan-var TSortClause[] */
private array $sortClauses;

private ?int $limit;

private int $offset;

/**
* @param TSortClause[]|null $sortClauses
* @param TCriterion|null $query
* @phpstan-param TSortClause[]|null $sortClauses
* @phpstan-param TCriterion|null $query
*/
public function __construct(
?CriterionInterface $query = null,
Expand All @@ -45,15 +45,15 @@ public function __construct(
}

/**
* @param TCriterion|null $criterion
* @phpstan-param TCriterion|null $criterion
*/
final public function setQuery(?CriterionInterface $criterion): void
{
$this->query = $criterion;
}

/**
* @return TCriterion|null
* @phpstan-return TCriterion|null
*/
final public function getQuery(): ?CriterionInterface
{
Expand Down Expand Up @@ -86,7 +86,7 @@ final public function setLimit(?int $limit): void
}

/**
* @return TSortClause[]
* @phpstan-return TSortClause[]
*/
final public function getSortClauses(): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/Values/Query/CriterionMapperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface CriterionMapperInterface
public function canHandle(CriterionInterface $criterion): bool;

/**
* @param C $criterion
* @phpstan-param C $criterion
*/
public function handle(CriterionInterface $criterion, CriterionMapper $mapper): Expression;
}

0 comments on commit 6cd933c

Please sign in to comment.