Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHPDoc] Prefixed template mentioning annotation with phpstan- #434

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading