Skip to content

Commit

Permalink
stop marking parameters implicitly as nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Mar 27, 2024
1 parent 5f24cd8 commit 893120c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Tests/Extractor/PhpDocExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function testEmptyParamAnnotation()
/**
* @dataProvider typesWithNoPrefixesProvider
*/
public function testExtractTypesWithNoPrefixes($property, array $type = null)
public function testExtractTypesWithNoPrefixes($property, ?array $type = null)
{
$noPrefixExtractor = new PhpDocExtractor(null, [], [], []);

Expand Down Expand Up @@ -202,7 +202,7 @@ public static function provideCollectionTypes()
/**
* @dataProvider typesWithCustomPrefixesProvider
*/
public function testExtractTypesWithCustomPrefixes($property, array $type = null)
public function testExtractTypesWithCustomPrefixes($property, ?array $type = null)
{
$customExtractor = new PhpDocExtractor(null, ['add', 'remove'], ['is', 'can']);

Expand Down Expand Up @@ -401,7 +401,7 @@ public function testUnknownPseudoType()
/**
* @dataProvider constructorTypesProvider
*/
public function testExtractConstructorTypes($property, array $type = null)
public function testExtractConstructorTypes($property, ?array $type = null)
{
$this->assertEquals($type, $this->extractor->getTypesFromConstructor('Symfony\Component\PropertyInfo\Tests\Fixtures\ConstructorDummy', $property));
}
Expand Down
12 changes: 6 additions & 6 deletions Tests/Extractor/PhpStanExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected function setUp(): void
/**
* @dataProvider typesProvider
*/
public function testExtract($property, array $type = null)
public function testExtract($property, ?array $type = null)
{
$this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property));
}
Expand Down Expand Up @@ -75,7 +75,7 @@ public function testInvalid($property)
/**
* @dataProvider typesWithNoPrefixesProvider
*/
public function testExtractTypesWithNoPrefixes($property, array $type = null)
public function testExtractTypesWithNoPrefixes($property, ?array $type = null)
{
$noPrefixExtractor = new PhpStanExtractor([], [], []);

Expand Down Expand Up @@ -130,7 +130,7 @@ public static function typesProvider()
/**
* @dataProvider provideCollectionTypes
*/
public function testExtractCollection($property, array $type = null)
public function testExtractCollection($property, ?array $type = null)
{
$this->testExtract($property, $type);
}
Expand Down Expand Up @@ -186,7 +186,7 @@ public static function provideCollectionTypes()
/**
* @dataProvider typesWithCustomPrefixesProvider
*/
public function testExtractTypesWithCustomPrefixes($property, array $type = null)
public function testExtractTypesWithCustomPrefixes($property, ?array $type = null)
{
$customExtractor = new PhpStanExtractor(['add', 'remove'], ['is', 'can']);

Expand Down Expand Up @@ -344,7 +344,7 @@ public static function propertiesParentTypeProvider(): array
/**
* @dataProvider constructorTypesProvider
*/
public function testExtractConstructorTypes($property, array $type = null)
public function testExtractConstructorTypes($property, ?array $type = null)
{
$this->assertEquals($type, $this->extractor->getTypesFromConstructor('Symfony\Component\PropertyInfo\Tests\Fixtures\ConstructorDummy', $property));
}
Expand Down Expand Up @@ -459,7 +459,7 @@ public static function intRangeTypeProvider(): array
/**
* @dataProvider php80TypesProvider
*/
public function testExtractPhp80Type(string $class, $property, array $type = null)
public function testExtractPhp80Type(string $class, $property, ?array $type = null)
{
$this->assertEquals($type, $this->extractor->getTypes($class, $property, []));
}
Expand Down

0 comments on commit 893120c

Please sign in to comment.