2021-04-13 00:12:48 +00:00
|
|
|
<?php
|
|
|
|
|
2021-05-09 20:15:43 +00:00
|
|
|
declare (strict_types=1);
|
2021-04-13 00:12:48 +00:00
|
|
|
namespace Rector\ChangesReporting\ValueObject;
|
|
|
|
|
|
|
|
use Rector\Core\Contract\Rector\RectorInterface;
|
|
|
|
final class RectorWithLineChange
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
*/
|
|
|
|
private $line;
|
|
|
|
/**
|
|
|
|
* @var RectorInterface
|
|
|
|
*/
|
|
|
|
private $rector;
|
2021-05-10 22:23:08 +00:00
|
|
|
public function __construct(\Rector\Core\Contract\Rector\RectorInterface $rector, int $line)
|
2021-04-13 00:12:48 +00:00
|
|
|
{
|
|
|
|
$this->rector = $rector;
|
|
|
|
$this->line = $line;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @return class-string<RectorInterface>
|
|
|
|
*/
|
2021-05-09 20:15:43 +00:00
|
|
|
public function getRectorClass() : string
|
2021-04-13 00:12:48 +00:00
|
|
|
{
|
2021-05-09 20:15:43 +00:00
|
|
|
return \get_class($this->rector);
|
2021-04-13 00:12:48 +00:00
|
|
|
}
|
2021-05-09 20:15:43 +00:00
|
|
|
public function getLine() : int
|
2021-04-13 00:12:48 +00:00
|
|
|
{
|
|
|
|
return $this->line;
|
|
|
|
}
|
|
|
|
}
|