rector/rules/Privatization/ValueObject/ReplaceStringWithClassConstant.php
Tomas Votruba abe47f2ff5 Updated Rector to commit af1cbb92fdd8792ea2020a08e546efe4adfc1701
af1cbb92fd [Core] Add Smarty Support for PhpFilesFinder check non-PHP files (#736)
2021-08-22 21:06:43 +00:00

55 lines
1.2 KiB
PHP

<?php
declare (strict_types=1);
namespace Rector\Privatization\ValueObject;
use PHPStan\Type\ObjectType;
final class ReplaceStringWithClassConstant
{
/**
* @var string
*/
private $class;
/**
* @var string
*/
private $method;
/**
* @var int
*/
private $argPosition;
/**
* @var string
*/
private $classWithConstants;
/**
* @param class-string $classWithConstants
*/
public function __construct(string $class, string $method, int $argPosition, string $classWithConstants)
{
$this->class = $class;
$this->method = $method;
$this->argPosition = $argPosition;
$this->classWithConstants = $classWithConstants;
}
public function getObjectType() : \PHPStan\Type\ObjectType
{
return new \PHPStan\Type\ObjectType($this->class);
}
public function getMethod() : string
{
return $this->method;
}
/**
* @return class-string
*/
public function getClassWithConstants() : string
{
return $this->classWithConstants;
}
public function getArgPosition() : int
{
return $this->argPosition;
}
}