rector/rules/Transform/ValueObject/StaticCallRecipe.php
Tomas Votruba 4b2bd56de7 Updated Rector to commit 6577da612c2824c2add06721b903de4cd438631e
6577da612c [DX] Add input validation for method, property and function name to avoid invalid output ast (#2668)
2022-07-16 09:41:53 +00:00

35 lines
736 B
PHP

<?php
declare (strict_types=1);
namespace Rector\Transform\ValueObject;
use Rector\Core\Validation\RectorAssert;
final class StaticCallRecipe
{
/**
* @readonly
* @var string
*/
private $className;
/**
* @readonly
* @var string
*/
private $methodName;
public function __construct(string $className, string $methodName)
{
$this->className = $className;
$this->methodName = $methodName;
RectorAssert::className($className);
RectorAssert::methodName($methodName);
}
public function getClassName() : string
{
return $this->className;
}
public function getMethodName() : string
{
return $this->methodName;
}
}