2024-03-15 19:25:11 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare (strict_types=1);
|
|
|
|
namespace Rector\Transform\ValueObject;
|
|
|
|
|
2024-03-16 10:32:26 +00:00
|
|
|
use PHPStan\Type\ObjectType;
|
2024-03-15 19:25:11 +00:00
|
|
|
class ArrayDimFetchToMethodCall
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @readonly
|
2024-03-16 10:32:26 +00:00
|
|
|
* @var \PHPStan\Type\ObjectType
|
2024-03-15 19:25:11 +00:00
|
|
|
*/
|
2024-03-16 10:32:26 +00:00
|
|
|
private $objectType;
|
2024-03-15 19:25:11 +00:00
|
|
|
/**
|
|
|
|
* @readonly
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
private $method;
|
2024-03-16 10:32:26 +00:00
|
|
|
public function __construct(ObjectType $objectType, string $method)
|
2024-03-15 19:25:11 +00:00
|
|
|
{
|
2024-03-16 10:32:26 +00:00
|
|
|
$this->objectType = $objectType;
|
2024-03-15 19:25:11 +00:00
|
|
|
$this->method = $method;
|
|
|
|
}
|
2024-03-16 10:32:26 +00:00
|
|
|
public function getObjectType() : ObjectType
|
2024-03-15 19:25:11 +00:00
|
|
|
{
|
2024-03-16 10:32:26 +00:00
|
|
|
return $this->objectType;
|
2024-03-15 19:25:11 +00:00
|
|
|
}
|
|
|
|
public function getMethod() : string
|
|
|
|
{
|
|
|
|
return $this->method;
|
|
|
|
}
|
|
|
|
}
|