separate different cases

This commit is contained in:
Tomas Votruba 2018-04-28 14:50:20 +02:00
parent f8c279f48c
commit 3717f13ec1
5 changed files with 29 additions and 4 deletions

View File

@ -11,7 +11,5 @@ class ActionClass
*/
public function someFunction(?string $name): ?string
{
/** @var string|null $someValueObject */
$someValueObject = 'value';
}
}

View File

@ -0,0 +1,14 @@
<?php
namespace SomeNamespace;
use Rector\Tests\Rector\Dynamic\ValueObjectRemoverRector\Source\SomeValueObject;
class ActionClass
{
public function someFunction(?string $name): ?string
{
/** @var string|null $someValueObject */
$someValueObject = 'value';
}
}

View File

@ -24,6 +24,7 @@ final class ValueObjectRemoverRectorTest 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

@ -11,7 +11,5 @@ class ActionClass
*/
public function someFunction(?SomeValueObject $name): ?SomeValueObject
{
/** @var SomeValueObject|null $someValueObject */
$someValueObject = new SomeValueObject('value');
}
}

View File

@ -0,0 +1,14 @@
<?php
namespace SomeNamespace;
use Rector\Tests\Rector\Dynamic\ValueObjectRemoverRector\Source\SomeValueObject;
class ActionClass
{
public function someFunction(?SomeValueObject $name): ?SomeValueObject
{
/** @var SomeValueObject|null $someValueObject */
$someValueObject = new SomeValueObject('value');
}
}