Skip to content

Commit 1860b20

Browse files
committed
Updating PHPStan version and checks
1 parent 0ff74b5 commit 1860b20

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"phpunit/phpunit": "^8.2.4||^9.4",
3535
"php-coveralls/php-coveralls": "^2.1",
3636
"mouf/picotainer": "^1.1",
37-
"phpstan/phpstan": "^0.12.25",
37+
"phpstan/phpstan": "^0.12.82",
3838
"beberlei/porpaginas": "^1.2",
3939
"myclabs/php-enum": "^1.6.6",
4040
"doctrine/coding-standard": "^8.2",

phpstan.neon

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,14 @@ parameters:
3333
message: '#Property TheCodingMachine\\GraphQLite\\Annotations\\Type::\$class \(class-string<object>\\|null\) does not accept string.#'
3434
path: src/Annotations/Type.php
3535
-
36-
message: '#Method TheCodingMachine\\GraphQLite\\AnnotationReader::getMethodAnnotations\(\) should return array<int, T of object> but returns array<object>.#'
36+
message: '#Method TheCodingMachine\\GraphQLite\\AnnotationReader::(getMethodAnnotations|getPropertyAnnotations)\(\) should return array<int, T of object> but returns array<object>.#'
37+
path: src/AnnotationReader.php
38+
-
39+
message: '#Method TheCodingMachine\\GraphQLite\\AnnotationReader::getClassAnnotations\(\) should return array<A of object> but returns array<object>.#'
40+
path: src/AnnotationReader.php
41+
-
42+
message: '#Parameter \#1 \$annotations of class TheCodingMachine\\GraphQLite\\Annotations\\ParameterAnnotations constructor expects array<int, TheCodingMachine\\GraphQLite\\Annotations\\ParameterAnnotationInterface>, array<object> given.#'
3743
path: src/AnnotationReader.php
38-
- '#Call to an undefined method GraphQL\\Error\\ClientAware::getMessage\(\)#'
3944

4045

4146
#-

src/AnnotationReader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,9 @@ private function isErrorImportant(string $annotationClass, string $docComment, s
408408
*/
409409
public function getClassAnnotations(ReflectionClass $refClass, string $annotationClass, bool $inherited = true): array
410410
{
411+
/**
412+
* @var array<array<A>>
413+
*/
411414
$toAddAnnotations = [];
412415
do {
413416
try {

src/Mappers/Proxys/MutableInterfaceTypeAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*/
2828
class MutableInterfaceTypeAdapter extends MutableInterfaceType implements MutableInterface
2929
{
30-
/** @use MutableAdapterTrait<InterfaceType> */
30+
/** @use MutableAdapterTrait */
3131
use MutableAdapterTrait;
3232

3333
public function __construct(InterfaceType $type, ?string $className = null)

src/Mappers/Proxys/MutableObjectTypeAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*/
2929
class MutableObjectTypeAdapter extends MutableObjectType implements MutableInterface
3030
{
31-
/** @use MutableAdapterTrait<ObjectType> */
31+
/** @use MutableAdapterTrait */
3232
use MutableAdapterTrait;
3333

3434
public function __construct(ObjectType $type, ?string $className = null)

0 commit comments

Comments
 (0)