Skip to content

Commit

Permalink
Mark template type as covariant
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Jan 28, 2024
1 parent 16cc5d8 commit af91ae7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/Context/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

/**
* @template-covariant TResult
* @template TReceive
* @template-covariant TReceive
* @template TSend
* @template-extends Channel<TReceive, TSend>
* @extends Channel<TReceive, TSend>
*/
interface Context extends Channel
{
Expand Down
6 changes: 3 additions & 3 deletions src/Context/Internal/AbstractContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
use function Amp\Parallel\Context\flattenArgument;

/**
* @template TResult
* @template TReceive
* @template-covariant TResult
* @template-covariant TReceive
* @template TSend
* @template-implements Context<TResult, TReceive, TSend>
* @implements Context<TResult, TReceive, TSend>
*/
abstract class AbstractContext implements Context
{
Expand Down
6 changes: 3 additions & 3 deletions src/Context/ProcessContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
use Amp\Process\ProcessException;

/**
* @template TResult
* @template TReceive
* @template-covariant TResult
* @template-covariant TReceive
* @template TSend
* @template-extends AbstractContext<TResult, TReceive, TSend>
* @extends AbstractContext<TResult, TReceive, TSend>
*/
final class ProcessContext extends AbstractContext
{
Expand Down
6 changes: 3 additions & 3 deletions src/Context/ThreadContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
use Revolt\EventLoop;

/**
* @template TResult
* @template TReceive
* @template-covariant TResult
* @template-covariant TReceive
* @template TSend
* @template-extends AbstractContext<TResult, TReceive, TSend>
* @extends AbstractContext<TResult, TReceive, TSend>
*/
final class ThreadContext extends AbstractContext
{
Expand Down

0 comments on commit af91ae7

Please sign in to comment.