2020-01-13 00:06:46 +01:00
|
|
|
<?php
|
|
|
|
|
2021-05-09 20:15:43 +00:00
|
|
|
declare (strict_types=1);
|
2021-01-30 20:56:32 +01:00
|
|
|
namespace Rector\DeadCode\ValueObject;
|
2020-01-13 00:06:46 +01:00
|
|
|
|
2021-01-30 20:56:32 +01:00
|
|
|
use Rector\DeadCode\Contract\ConditionInterface;
|
2021-05-10 22:23:08 +00:00
|
|
|
final class VersionCompareCondition implements \Rector\DeadCode\Contract\ConditionInterface
|
2020-01-13 00:06:46 +01:00
|
|
|
{
|
|
|
|
/**
|
2020-11-26 23:09:21 +01:00
|
|
|
* @var int
|
2020-01-13 00:06:46 +01:00
|
|
|
*/
|
|
|
|
private $firstVersion;
|
|
|
|
/**
|
2020-11-26 23:09:21 +01:00
|
|
|
* @var int
|
2020-01-13 00:06:46 +01:00
|
|
|
*/
|
|
|
|
private $secondVersion;
|
|
|
|
/**
|
|
|
|
* @var string|null
|
|
|
|
*/
|
|
|
|
private $compareSign;
|
2020-11-26 23:09:21 +01:00
|
|
|
public function __construct(int $firstVersion, int $secondVersion, ?string $compareSign)
|
2020-01-13 00:06:46 +01:00
|
|
|
{
|
|
|
|
$this->firstVersion = $firstVersion;
|
|
|
|
$this->secondVersion = $secondVersion;
|
|
|
|
$this->compareSign = $compareSign;
|
|
|
|
}
|
2021-05-09 20:15:43 +00:00
|
|
|
public function getFirstVersion() : int
|
2020-01-13 00:06:46 +01:00
|
|
|
{
|
|
|
|
return $this->firstVersion;
|
|
|
|
}
|
2021-05-09 20:15:43 +00:00
|
|
|
public function getSecondVersion() : int
|
2020-01-13 00:06:46 +01:00
|
|
|
{
|
|
|
|
return $this->secondVersion;
|
|
|
|
}
|
2021-05-09 20:15:43 +00:00
|
|
|
public function getCompareSign() : ?string
|
2020-01-13 00:06:46 +01:00
|
|
|
{
|
|
|
|
return $this->compareSign;
|
|
|
|
}
|
|
|
|
}
|