2021-01-31 01:14:13 +01:00
|
|
|
<?php
|
|
|
|
|
2021-05-09 20:15:43 +00:00
|
|
|
declare (strict_types=1);
|
2021-01-31 01:14:13 +01:00
|
|
|
namespace Rector\RemovingStatic\NodeFactory;
|
|
|
|
|
|
|
|
use PhpParser\Node\Stmt\Expression;
|
|
|
|
use Rector\Core\PhpParser\Node\NodeFactory;
|
|
|
|
use Rector\Core\ValueObject\MethodName;
|
|
|
|
final class SetUpFactory
|
|
|
|
{
|
|
|
|
/**
|
2021-05-10 23:39:21 +00:00
|
|
|
* @var \Rector\Core\PhpParser\Node\NodeFactory
|
2021-01-31 01:14:13 +01:00
|
|
|
*/
|
|
|
|
private $nodeFactory;
|
2021-05-10 22:23:08 +00:00
|
|
|
public function __construct(\Rector\Core\PhpParser\Node\NodeFactory $nodeFactory)
|
2021-01-31 01:14:13 +01:00
|
|
|
{
|
|
|
|
$this->nodeFactory = $nodeFactory;
|
|
|
|
}
|
2021-05-10 22:23:08 +00:00
|
|
|
public function createParentStaticCall() : \PhpParser\Node\Stmt\Expression
|
2021-01-31 01:14:13 +01:00
|
|
|
{
|
2021-05-10 22:23:08 +00:00
|
|
|
$parentSetupStaticCall = $this->nodeFactory->createStaticCall('parent', \Rector\Core\ValueObject\MethodName::SET_UP);
|
|
|
|
return new \PhpParser\Node\Stmt\Expression($parentSetupStaticCall);
|
2021-01-31 01:14:13 +01:00
|
|
|
}
|
|
|
|
}
|