Skip to content

Commit daee094

Browse files
committed
Implement PHPStan up to level 1
1 parent 8ae5647 commit daee094

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

phpstan.neon

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
parameters:
2+
level: 1
3+
ignoreErrors:
4+
-
5+
identifier: new.static
6+
paths:
7+
- src

src/Connection/ImapConnection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ protected function assertTaggedResponse(string $tag, ?callable $exception = null
719719
*
720720
* @template T of Response
721721
*
722-
* @param callable(Response): bool $filter
722+
* @param callable(T): bool $filter
723723
* @return T
724724
*/
725725
protected function assertNextResponse(callable $filter, callable $assertion, callable $exception): Response
@@ -740,7 +740,7 @@ protected function assertNextResponse(callable $filter, callable $assertion, cal
740740
*
741741
* @template T of Response
742742
*
743-
* @param callable(Response): bool $filter
743+
* @param callable(T): bool $filter
744744
* @return T
745745
*/
746746
protected function nextResponse(callable $filter): Response

src/Support/ForwardsCalls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function forwardCallTo(object $object, string $method, array $paramete
3333
/**
3434
* Throw a bad method call exception for the given method.
3535
*/
36-
protected static function throwBadMethodCallException(string $method)
36+
protected static function throwBadMethodCallException(string $method): never
3737
{
3838
throw new BadMethodCallException(sprintf(
3939
'Call to undefined method %s::%s()', static::class, $method

0 commit comments

Comments
 (0)