Skip to content

Commit

Permalink
Fixed PHPstan rules level 8
Browse files Browse the repository at this point in the history
  • Loading branch information
gplanchat committed Jun 28, 2021
1 parent 9c68620 commit 0a100fb
Show file tree
Hide file tree
Showing 18 changed files with 355 additions and 59 deletions.
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions .idea/php-test-framework.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

143 changes: 143 additions & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 68 additions & 0 deletions .idea/promise.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bin/php-parse
1 change: 1 addition & 0 deletions bin/phpspec
1 change: 1 addition & 0 deletions bin/phpunit
1 change: 1 addition & 0 deletions bin/yaml-lint
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions src/Deferred.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@

/**
* @api
* @template Type
* @implements Contract\DeferredInterface<Type>
* @template ExpectationType
* @template ExceptionType of \Throwable
* @implements Contract\DeferredInterface<ExpectationType, ExceptionType>
*/
final class Deferred implements Contract\DeferredInterface
{
/** @param Contract\PromiseInterface<Type> $promise */
/** @param Contract\PromiseInterface<ExpectationType, ExceptionType> $promise */
public function __construct(private Contract\PromiseInterface $promise)
{
}

/**
* @param callable(Type): Type $callback
* @param callable(ExpectationType): void $callback
*
* @return Contract\DeferredInterface<Type>
* @return Contract\DeferredInterface<ExpectationType, ExceptionType>
*/
public function then(callable $callback): Contract\DeferredInterface
{
Expand All @@ -28,9 +29,9 @@ public function then(callable $callback): Contract\DeferredInterface
}

/**
* @param callable(\Throwable):\Throwable $callback
* @param callable(ExceptionType): void $callback
*
* @return Contract\DeferredInterface<Type>
* @return Contract\DeferredInterface<ExpectationType, ExceptionType>
*/
public function failure(callable $callback): Contract\DeferredInterface
{
Expand Down
Loading

0 comments on commit 0a100fb

Please sign in to comment.