2022-08-11 15:03:59 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare (strict_types=1);
|
|
|
|
namespace Rector\Transform\ValueObject;
|
|
|
|
|
2024-01-02 02:40:38 +00:00
|
|
|
use Rector\Validation\RectorAssert;
|
2022-08-11 15:03:59 +00:00
|
|
|
final class ClassMethodReference
|
|
|
|
{
|
|
|
|
/**
|
2023-06-11 23:01:39 +00:00
|
|
|
* @readonly
|
2022-08-11 15:03:59 +00:00
|
|
|
*/
|
2024-11-20 15:58:53 +00:00
|
|
|
private string $class;
|
2022-08-11 15:03:59 +00:00
|
|
|
/**
|
2023-06-11 23:01:39 +00:00
|
|
|
* @readonly
|
2022-08-11 15:03:59 +00:00
|
|
|
*/
|
2024-11-20 15:58:53 +00:00
|
|
|
private string $method;
|
2022-08-11 15:03:59 +00:00
|
|
|
public function __construct(string $class, string $method)
|
|
|
|
{
|
|
|
|
$this->class = $class;
|
|
|
|
$this->method = $method;
|
|
|
|
RectorAssert::className($class);
|
|
|
|
RectorAssert::methodName($method);
|
|
|
|
}
|
|
|
|
public function getClass() : string
|
|
|
|
{
|
|
|
|
return $this->class;
|
|
|
|
}
|
|
|
|
public function getMethod() : string
|
|
|
|
{
|
|
|
|
return $this->method;
|
|
|
|
}
|
|
|
|
}
|