Skip to content

Commit 2913b96

Browse files
committed
Improve phpstan settings
1 parent 638dba8 commit 2913b96

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"require-dev": {
3131
"friendsofphp/php-cs-fixer": "^v3.15.1",
3232
"httpwg/structured-field-tests": "*@dev",
33-
"phpstan/phpstan": "^1.10.12",
33+
"phpstan/phpstan": "^1.10.13",
3434
"phpstan/phpstan-strict-rules": "^1.5.1",
3535
"phpstan/phpstan-phpunit": "^1.3.11",
3636
"phpstan/phpstan-deprecation-rules": "^1.1.3",

phpstan.neon

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ parameters:
88
paths:
99
- src
1010
ignoreErrors:
11-
- '#it_fails_to_create_an_item_from_an_array_of_pairs\(\)#'
11+
- message: '#it_fails_to_create_an_item_from_an_array_of_pairs\(\)#'
12+
path: src/ItemTest.php
1213
reportUnmatchedIgnoredErrors: true

src/ItemTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ public function it_can_create_and_return_an_array_of_pairs(): void
362362
#[Test]
363363
#[DataProvider('invalidPairProvider')]
364364
/**
365-
* @param array<mixed> $pair
365+
* @param array<int|string|array<int|string>> $pair
366366
*/
367367
public function it_fails_to_create_an_item_from_an_array_of_pairs(array $pair): void
368368
{
@@ -372,7 +372,7 @@ public function it_fails_to_create_an_item_from_an_array_of_pairs(array $pair):
372372
}
373373

374374
/**
375-
* @return iterable<string, array{pair:array<mixed>}>
375+
* @return iterable<string, array{pair:array<int|string|array<int|string>>}>
376376
*/
377377
public static function invalidPairProvider(): iterable
378378
{

0 commit comments

Comments
 (0)