mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-22 18:54:39 +01:00
55 lines
1.1 KiB
PHP
55 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\Transform\ValueObject;
|
|
|
|
use PHPStan\Type\ObjectType;
|
|
final class MethodCallToAnotherMethodCallWithArguments
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $type;
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $oldMethod;
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $newMethod;
|
|
/**
|
|
* @var mixed[]
|
|
*/
|
|
private $newArguments;
|
|
/**
|
|
* @param mixed[] $newArguments
|
|
*/
|
|
public function __construct(string $type, string $oldMethod, string $newMethod, array $newArguments)
|
|
{
|
|
$this->type = $type;
|
|
$this->oldMethod = $oldMethod;
|
|
$this->newMethod = $newMethod;
|
|
$this->newArguments = $newArguments;
|
|
}
|
|
public function getObjectType() : \PHPStan\Type\ObjectType
|
|
{
|
|
return new \PHPStan\Type\ObjectType($this->type);
|
|
}
|
|
public function getOldMethod() : string
|
|
{
|
|
return $this->oldMethod;
|
|
}
|
|
public function getNewMethod() : string
|
|
{
|
|
return $this->newMethod;
|
|
}
|
|
/**
|
|
* @return mixed[]
|
|
*/
|
|
public function getNewArguments() : array
|
|
{
|
|
return $this->newArguments;
|
|
}
|
|
}
|