add old to new typehint case

This commit is contained in:
Tomas Votruba 2018-04-25 20:15:08 +02:00
parent a0397df9b7
commit f4f3849792
3 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,10 @@
<?php declare(strict_types=1);
namespace SomeNamespace;
class SomeClass
{
public function nullable(): ?\SomeType
{
}
}

View File

@ -23,6 +23,7 @@ final class ReturnTypehintRectorTest extends AbstractRectorTestCase
yield [__DIR__ . '/Wrong/wrong.php.inc', __DIR__ . '/Correct/correct.php.inc'];
yield [__DIR__ . '/Wrong/wrong2.php.inc', __DIR__ . '/Correct/correct2.php.inc'];
yield [__DIR__ . '/Wrong/wrong3.php.inc', __DIR__ . '/Correct/correct3.php.inc'];
yield [__DIR__ . '/Wrong/wrong4.php.inc', __DIR__ . '/Correct/correct4.php.inc'];
}
protected function provideConfig(): string

View File

@ -0,0 +1,10 @@
<?php declare(strict_types=1);
namespace SomeNamespace;
class SomeClass
{
public function nullable(): array
{
}
}