rector/rules/Transform/ValueObject/DimFetchAssignToMethodCall.php
Tomas Votruba c726969380 Updated Rector to commit fc10fce13d
fc10fce13d [Rectify] [Php81] Enable Rectify on Readonly Property only (#1384)
2021-12-04 12:47:17 +00:00

43 lines
965 B
PHP

<?php
declare (strict_types=1);
namespace Rector\Transform\ValueObject;
use PHPStan\Type\ObjectType;
final class DimFetchAssignToMethodCall
{
/**
* @readonly
* @var string
*/
private $listClass;
/**
* @readonly
* @var string
*/
private $itemClass;
/**
* @readonly
* @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() : \PHPStan\Type\ObjectType
{
return new \PHPStan\Type\ObjectType($this->listClass);
}
public function getItemObjectType() : \PHPStan\Type\ObjectType
{
return new \PHPStan\Type\ObjectType($this->itemClass);
}
public function getAddMethod() : string
{
return $this->addMethod;
}
}