Skip to content

Commit

Permalink
[PHPDoc] Prefixed template mentioning annotation with phpstan- (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon authored Oct 9, 2024
1 parent f6dde52 commit c338dc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/contracts/Pool/Pool.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ final class Pool implements PoolInterface

private string $class;

/** @var iterable<string,T> */
/** @phpstan-var iterable<string,T> */
private iterable $entries;

private string $exceptionArgumentName = '$alias';

private string $exceptionMessageTemplate = self::DEFAULT_EXCEPTION_MESSAGE_TEMPLATE;

/**
* @param iterable<string,T> $entries
* @phpstan-param iterable<string,T> $entries
*/
public function __construct(string $class, iterable $entries = [])
{
Expand All @@ -44,7 +44,7 @@ public function has(string $alias): bool
/**
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
*
* @return T
* @phpstan-return T
*/
public function get(string $alias)
{
Expand All @@ -64,7 +64,7 @@ public function get(string $alias)
}

/**
* @return T|null
* @phpstan-return T|null
*/
private function findEntry(string $needle)
{
Expand All @@ -78,7 +78,7 @@ private function findEntry(string $needle)
}

/**
* @return iterable<string,T>
* @phpstan-return iterable<string,T>
*/
public function getEntries(): iterable
{
Expand Down
4 changes: 2 additions & 2 deletions src/contracts/Pool/PoolInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ public function has(string $alias): bool;
/**
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
*
* @return T
* @phpstan-return T
*/
public function get(string $alias);

/**
* @return iterable<string,T>
* @phpstan-return iterable<string,T>
*/
public function getEntries(): iterable;

Expand Down

0 comments on commit c338dc5

Please sign in to comment.