This commit is contained in:
mssimi 2018-05-18 20:47:08 +02:00
parent a19012c6fd
commit 239f354fb1
3 changed files with 15 additions and 14 deletions

View File

@ -47,8 +47,8 @@ final class MethodCallTypeResolverTest extends AbstractNodeTypeResolverTest
'Rector\NodeTypeResolver\Tests\Source\SomeClass',
]];
#on trait method call
yield [__DIR__ . '/MethodCallSource/SomeParentClassWithTraitCall.php.inc', 0, [
'Doctrine\Common\Persistence\ManagerRegistry',
yield [__DIR__ . '/MethodCallSource/SomeClassWithTraitCall.php.inc', 0, [
'Rector\NodeTypeResolver\Tests\Source\SomeClass',
]];
}
}

View File

@ -2,17 +2,7 @@
namespace Rector\NodeTypeResolver\Tests\Source;
use Doctrine\Common\Persistence\ManagerRegistry;
class SomeClassWithTrait
final class SomeClassWithTrait
{
use ControllerTrait;
}
trait ControllerTrait
{
public function getDoctrine(): ManagerRegistry
{
return new ManagerRegistry();
}
use SomeTrait;
}

View File

@ -0,0 +1,11 @@
<?php declare(strict_types=1);
namespace Rector\NodeTypeResolver\Tests\Source;
trait SomeTrait
{
public function getDoctrine(): SomeClass
{
return new SomeClass();
}
}