Skip to content

Commit

Permalink
Merge pull request #634 from kukulich/infection
Browse files Browse the repository at this point in the history
Fixed some bugs reported by Infection
  • Loading branch information
Ocramius committed Jun 4, 2020
2 parents fbca876 + 2bf77e6 commit 48b8cb8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class FileReadTrapStreamWrapper
* @psalm-readonly
* @psalm-allow-private-mutation
*/
public static ?string $autoloadLocatedFile;
public static ?string $autoloadLocatedFile = null;

/**
* @param callable() : ExecutedMethodReturnType $executeMeWithinStreamWrapperOverride
Expand Down
6 changes: 6 additions & 0 deletions test/unit/Reflection/ReflectionParameterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ public function testHasTypeReturnsFalseWithoutType() : void
self::assertFalse($method->getParameter('noTypeParam')->hasType());
}

/**
* @runInSeparateProcess
*/
public function testSetType() : void
{
$classInfo = $this->reflector->reflect(Php7ParameterTypeDeclarations::class);
Expand All @@ -354,6 +357,9 @@ public function testSetType() : void
);
}

/**
* @runInSeparateProcess
*/
public function testRemoveType() : void
{
$classInfo = $this->reflector->reflect(Php7ParameterTypeDeclarations::class);
Expand Down
6 changes: 6 additions & 0 deletions test/unit/Reflection/ReflectionPropertyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,9 @@ public function testGetType(
self::assertSame($expectedType, (string) $type);
}

/**
* @runInSeparateProcess
*/
public function testSetType() : void
{
$classReflection = $this->reflector->reflect(Php74PropertyTypeDeclarations::class);
Expand All @@ -660,6 +663,9 @@ public function testSetType() : void
);
}

/**
* @runInSeparateProcess
*/
public function testRemoveType() : void
{
$classReflection = $this->reflector->reflect(Php74PropertyTypeDeclarations::class);
Expand Down

0 comments on commit 48b8cb8

Please sign in to comment.