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 BinaryToVersionCompareCondition implements \Rector\DeadCode\Contract\ConditionInterface
|
2020-01-13 00:06:46 +01:00
|
|
|
{
|
|
|
|
/**
|
2021-05-10 23:39:21 +00:00
|
|
|
* @var \Rector\DeadCode\ValueObject\VersionCompareCondition
|
2020-01-13 00:06:46 +01:00
|
|
|
*/
|
2020-02-01 17:04:38 +01:00
|
|
|
private $versionCompareCondition;
|
2020-07-31 22:20:45 +02:00
|
|
|
/**
|
2021-05-10 23:39:21 +00:00
|
|
|
* @var string
|
2020-07-31 22:20:45 +02:00
|
|
|
*/
|
2021-05-10 23:39:21 +00:00
|
|
|
private $binaryClass;
|
2020-07-31 22:20:45 +02:00
|
|
|
private $expectedValue;
|
2020-07-27 08:56:25 +02:00
|
|
|
/**
|
|
|
|
* @param mixed $expectedValue
|
|
|
|
*/
|
2021-05-09 20:15:43 +00:00
|
|
|
public function __construct(\Rector\DeadCode\ValueObject\VersionCompareCondition $versionCompareCondition, string $binaryClass, $expectedValue)
|
|
|
|
{
|
2020-01-13 00:06:46 +01:00
|
|
|
$this->versionCompareCondition = $versionCompareCondition;
|
|
|
|
$this->binaryClass = $binaryClass;
|
|
|
|
$this->expectedValue = $expectedValue;
|
|
|
|
}
|
2021-05-09 20:15:43 +00:00
|
|
|
public function getVersionCompareCondition() : \Rector\DeadCode\ValueObject\VersionCompareCondition
|
2020-01-13 00:06:46 +01:00
|
|
|
{
|
|
|
|
return $this->versionCompareCondition;
|
|
|
|
}
|
2021-05-09 20:15:43 +00:00
|
|
|
public function getBinaryClass() : string
|
2020-01-13 00:06:46 +01:00
|
|
|
{
|
|
|
|
return $this->binaryClass;
|
|
|
|
}
|
2020-07-27 08:56:25 +02:00
|
|
|
/**
|
|
|
|
* @return mixed
|
|
|
|
*/
|
2020-01-13 00:06:46 +01:00
|
|
|
public function getExpectedValue()
|
|
|
|
{
|
|
|
|
return $this->expectedValue;
|
|
|
|
}
|
|
|
|
}
|