Skip to content

Commit 4876826

Browse files
committed
Update phpstan
1 parent ef75da9 commit 4876826

File tree

13 files changed

+11
-36
lines changed

13 files changed

+11
-36
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
### Changed
1616

1717
- `APPLY` option of Aggregate command is now dependent of the last inserted option (if the option have a meaning for `APPLY`)
18+
- (dev) Update `phpstan` (from `0.12` to `1.2`)
1819

1920
### Fixed
2021

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"insolita/unused-scanner": "^2.3",
3333
"php-parallel-lint/php-parallel-lint": "^1.3",
3434
"phpmd/phpmd": "^2.10",
35-
"phpstan/phpstan": "^0.12.92",
35+
"phpstan/phpstan": "^1.2.0",
3636
"phpunit/phpunit": "^8.5 || ^9.3",
3737
"predis/predis": "^1.1",
3838
"ptrofimov/tinyredisclient": "^1.1",

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ parameters:
1010
- '#Method MacFJA\\RediSearch\\Redis\\Command\\\w+::getLanguageOptions\(\) should return#'
1111
- '#uses generic trait MacFJA\\RediSearch\\Redis\\Command\\Option\\DecoratedOptionTrait but does not specify its types: T#'
1212
- '#Call to an undefined method MacFJA\\RediSearch\\Redis\\Command\\Option\\CustomValidatorOption::setValue\(\).#'
13+
- '#Method MacFJA\\RediSearch\\tests\\Redis.+::dataProvider\(\) return type has no value type specified in iterable type (array|Generator).#'
1314
-
1415
message: '#Call to an undefined method MacFJA\\RediSearch\\Redis\\Command\\Option\\CommandOption::set\w+\(\).#'
1516
path: src/Redis/Command/Option/GroupedOption.php

src/Redis/Command/AggregateCommand/ReduceOption.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function isValid(): bool
6060
}
6161

6262
/**
63-
* @return array<string,null|array|string>
63+
* @return array<string,null|array<float|int|string>|string>
6464
*/
6565
public function getOptionData()
6666
{

tests/Redis/Command/Option/BaseOptionTestTrait.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,5 @@ public function testGetOptionData(CommandOption $inputOption, $expected): void
5454
self::assertEquals($expected, $inputOption->getOptionData());
5555
}
5656

57-
/**
58-
* @return Generator<array>
59-
*/
6057
abstract public function dataProvider(string $testName): Generator;
6158
}

tests/Redis/Command/Option/CustomValidatorOptionTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ public function testShorthands(): void
6161
static::assertFalse($invalidList->isValid());
6262
}
6363

64-
/**
65-
* @return Generator<array>
66-
*/
6764
public function dataProvider(string $testName): Generator
6865
{
6966
$invalidMinLengthOption = new CustomValidatorOption(new NamelessOption('foo'), new Length(4));

tests/Redis/Command/Option/FlagOptionTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ public function testGetName(): void
5858
static::assertEquals('BAR', $option->getName());
5959
}
6060

61-
/**
62-
* @return Generator<array>
63-
*/
6461
public function dataProvider(string $testName): Generator
6562
{
6663
$defaultValueFlag = new FlagOption('FOO');

tests/Redis/Command/Option/GroupedOptionTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ public function testSetLockOptionData(): void
122122
$option->setDataOfOption('lock', 'bar');
123123
}
124124

125-
/**
126-
* @return Generator<array>
127-
*/
128125
public function dataProvider(string $testName): Generator
129126
{
130127
$emptyGroup = new GroupedOption([], []);

tests/Redis/Command/Option/NamedOptionTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ public function testGetName(): void
5757
static::assertEquals('BAR', $option->getName());
5858
}
5959

60-
/**
61-
* @return Generator<array>
62-
*/
6360
public function dataProvider(string $testName): Generator
6461
{
6562
$defaultValueOption = new NamedOption('FOO');

tests/Redis/Command/Option/NamelessOptionTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ public function testGetSetValue(): void
4848
static::assertEquals(10, $option->getValue());
4949
}
5050

51-
/**
52-
* @return Generator<array>
53-
*/
5451
public function dataProvider(string $testName): Generator
5552
{
5653
$defaultValueOption = new NamelessOption();

0 commit comments

Comments
 (0)