Skip to content

Commit

Permalink
Fix some psalm errors
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorprogger committed Sep 18, 2024
1 parent 4b2b56d commit 760edee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Message/EnvelopeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ public function withMessage(MessageInterface $message): self;
/**
* Finds an envelope in the current envelope stack or creates a new one from the message.
*
* @template T
* @template T of EnvelopeInterface
*
* @psalm-param T<class-string<EnvelopeInterface>> $className
* @psalm-param class-string<T> $className
* @throws NotEnvelopInterfaceException Implementation MUST throw this exception if the given class does not
* implement {@see EnvelopeInterface}.
*
Expand Down
4 changes: 2 additions & 2 deletions src/Message/EnvelopeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public function getMetadata(): array
/**
* Finds an envelope in the current envelope stack or creates a new one from the message.
*
* @template T
* @template T of EnvelopeInterface
*
* @psalm-param T<class-string<EnvelopeInterface>> $className
* @psalm-param class-string<T> $className
* @throws NotEnvelopInterfaceException is thrown if the given class does not implement {@see EnvelopeInterface}.
*
* @psalm-return T

Check failure on line 56 in src/Message/EnvelopeTrait.php

View workflow job for this annotation

GitHub Actions / psalm / PHP 8.1-ubuntu-latest

InvalidReturnType

src/Message/EnvelopeTrait.php:56:22: InvalidReturnType: The declared return type 'T:fn-yiisoft\queue\message\envelopetrait::getenvelopefromstack as Yiisoft\Queue\Message\EnvelopeInterface' for Yiisoft\Queue\Message\EnvelopeTrait::getEnvelopeFromStack is incorrect, got 'Yiisoft\Queue\Message\EnvelopeInterface' (see https://psalm.dev/011)

Check failure on line 56 in src/Message/EnvelopeTrait.php

View workflow job for this annotation

GitHub Actions / psalm / PHP 8.2-ubuntu-latest

InvalidReturnType

src/Message/EnvelopeTrait.php:56:22: InvalidReturnType: The declared return type 'T:fn-yiisoft\queue\message\envelopetrait::getenvelopefromstack as Yiisoft\Queue\Message\EnvelopeInterface' for Yiisoft\Queue\Message\EnvelopeTrait::getEnvelopeFromStack is incorrect, got 'Yiisoft\Queue\Message\EnvelopeInterface' (see https://psalm.dev/011)

Check failure on line 56 in src/Message/EnvelopeTrait.php

View workflow job for this annotation

GitHub Actions / psalm / PHP 8.3-ubuntu-latest

InvalidReturnType

src/Message/EnvelopeTrait.php:56:22: InvalidReturnType: The declared return type 'T:fn-yiisoft\queue\message\envelopetrait::getenvelopefromstack as Yiisoft\Queue\Message\EnvelopeInterface' for Yiisoft\Queue\Message\EnvelopeTrait::getEnvelopeFromStack is incorrect, got 'Yiisoft\Queue\Message\EnvelopeInterface' (see https://psalm.dev/011)
Expand Down

0 comments on commit 760edee

Please sign in to comment.