mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-28 13:43:31 +00:00
46 lines
861 B
PHP
46 lines
861 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace Rector\Transform\ValueObject;
|
|
|
|
use PHPStan\Type\ObjectType;
|
|
|
|
final class DimFetchAssignToMethodCall
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $listClass;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $itemClass;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $addMethod;
|
|
|
|
public function __construct(string $listClass, string $itemClass, string $addMethod)
|
|
{
|
|
$this->listClass = $listClass;
|
|
$this->itemClass = $itemClass;
|
|
$this->addMethod = $addMethod;
|
|
}
|
|
|
|
public function getListObjectType(): ObjectType
|
|
{
|
|
return new ObjectType($this->listClass);
|
|
}
|
|
|
|
public function getItemObjectType(): ObjectType
|
|
{
|
|
return new ObjectType($this->itemClass);
|
|
}
|
|
|
|
public function getAddMethod(): string
|
|
{
|
|
return $this->addMethod;
|
|
}
|
|
}
|