rector/packages/BetterPhpDocParser/ValueObject/StartAndEnd.php
Tomas Votruba 3313a231b7 Updated Rector to commit bb609b28e327ca1fb7827b6bc548013d19a2cf4e
bb609b28e3 [Core] Always reset stopTraversal to false on next Rector visit (#4182)
2023-06-11 14:17:34 +00:00

34 lines
630 B
PHP

<?php
declare (strict_types=1);
namespace Rector\BetterPhpDocParser\ValueObject;
use Rector\Core\Exception\ShouldNotHappenException;
final class StartAndEnd
{
/**
* @var int
*/
private $start;
/**
* @var int
*/
private $end;
public function __construct(int $start, int $end)
{
$this->start = $start;
$this->end = $end;
if ($end < $start) {
throw new ShouldNotHappenException();
}
}
public function getStart() : int
{
return $this->start;
}
public function getEnd() : int
{
return $this->end;
}
}