Skip to content

Commit 023fc24

Browse files
committed
new codestyle, Phpstan issues
1 parent 2ca280e commit 023fc24

16 files changed

Lines changed: 97 additions & 51 deletions

File tree

.github/workflows/php.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup PHP
2121
uses: shivammathur/setup-php@v2
2222
with:
23-
php-version: '8.1'
23+
php-version: '8.5'
2424
ini-values: zend.assertions=1, assert.exception=1
2525
coverage: xdebug
2626
env:
@@ -49,7 +49,7 @@ jobs:
4949
- name: Setup PHP
5050
uses: shivammathur/setup-php@v2
5151
with:
52-
php-version: '8.1'
52+
php-version: '8.5'
5353
ini-values: zend.assertions=1, assert.exception=1
5454
coverage: xdebug
5555
env:
@@ -73,7 +73,7 @@ jobs:
7373
- name: Setup PHP
7474
uses: shivammathur/setup-php@v2
7575
with:
76-
php-version: '8.1'
76+
php-version: '8.5'
7777
ini-values: zend.assertions=1, assert.exception=1
7878
env:
7979
update: true
@@ -96,7 +96,7 @@ jobs:
9696
- name: Setup PHP
9797
uses: shivammathur/setup-php@v2
9898
with:
99-
php-version: '8.1'
99+
php-version: '8.5'
100100
env:
101101
update: true
102102

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea/*
22
build/*
33
vendor/*
4+
.phpunit.cache
45
.phpunit.result.cache

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
}
1313
],
1414
"require": {
15-
"php": ">=8.0",
16-
"infinityloop-dev/graphpinator-tokenizer": "^1.2",
15+
"php": ">=8.1",
16+
"infinityloop-dev/graphpinator-tokenizer": "^1.3",
1717
"infinityloop-dev/graphpinator-common": "^2.0",
1818
"infinityloop-dev/utils": "^2.0"
1919
},
@@ -29,8 +29,8 @@
2929
"Composer\\Config::disableProcessTimeout",
3030
"infection -j$(nproc)"
3131
],
32-
"phpstan": "phpstan analyze --level 3 src",
33-
"phpstan-next": "phpstan analyze --level 4 src",
32+
"phpstan": "phpstan analyze --level max src",
33+
"phpstan-next": "phpstan analyze --level max src",
3434
"phpstan-max": "phpstan analyze --level max src",
3535
"codestyle": "phpcs --extensions=php src tests",
3636
"codestyle-fix": "phpcbf --extensions=php src tests"

composer.lock

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
parameters:
2+
rememberPossiblyImpureFunctionValues: false

src/Exception/ParserError.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
abstract class ParserError extends GraphpinatorBase
1111
{
12+
/**
13+
* @param Location $location
14+
* @param list<string> $messageArgs
15+
*/
1216
public function __construct(
1317
Location $location,
1418
array $messageArgs = [],

src/Field/FieldSet.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ final class FieldSet extends ObjectSet
1515
{
1616
protected const INNER_CLASS = Field::class;
1717

18+
/**
19+
* @param list<Field> $fields
20+
*/
1821
public function __construct(
1922
array $fields,
2023
private FragmentSpreadSet $fragments,

src/Fragment/FragmentSet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ final class FragmentSet extends ImplicitObjectMap
1616

1717
protected function getKey(object $object) : string
1818
{
19-
return $object->getName();
19+
return $object->getName(); // @phpstan-ignore method.notFound
2020
}
2121
}

src/Operation/Operation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
final class Operation
1212
{
13-
private ?VariableSet $variables;
14-
private ?DirectiveSet $directives;
13+
private VariableSet $variables;
14+
private DirectiveSet $directives;
1515

1616
public function __construct(
1717
private string $type,

src/Operation/OperationSet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ final class OperationSet extends ImplicitObjectMap
1616

1717
protected function getKey(object $object) : string
1818
{
19-
return $object->getName()
19+
return $object->getName() // @phpstan-ignore method.notFound
2020
?? '';
2121
}
2222
}

0 commit comments

Comments
 (0)