mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-28 13:43:31 +00:00
363a910cf7
a7db1ad94d
use scoper 0.15
40 lines
877 B
PHP
40 lines
877 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\Transform\ValueObject;
|
|
|
|
use PHPStan\Type\ObjectType;
|
|
final class FuncCallToMethodCall
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $oldFuncName;
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $newClassName;
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $newMethodName;
|
|
public function __construct(string $oldFuncName, string $newClassName, string $newMethodName)
|
|
{
|
|
$this->oldFuncName = $oldFuncName;
|
|
$this->newClassName = $newClassName;
|
|
$this->newMethodName = $newMethodName;
|
|
}
|
|
public function getOldFuncName() : string
|
|
{
|
|
return $this->oldFuncName;
|
|
}
|
|
public function getNewObjectType() : ObjectType
|
|
{
|
|
return new ObjectType($this->newClassName);
|
|
}
|
|
public function getNewMethodName() : string
|
|
{
|
|
return $this->newMethodName;
|
|
}
|
|
}
|