2021-01-16 13:23:37 +01:00
|
|
|
<?php
|
|
|
|
|
2021-05-09 20:15:43 +00:00
|
|
|
declare (strict_types=1);
|
2021-01-16 13:23:37 +01:00
|
|
|
namespace Rector\Composer\ValueObject;
|
|
|
|
|
2021-01-18 11:07:57 +01:00
|
|
|
use Rector\Composer\Contract\VersionAwareInterface;
|
2021-05-10 22:23:08 +00:00
|
|
|
final class PackageAndVersion implements \Rector\Composer\Contract\VersionAwareInterface
|
2021-01-16 13:23:37 +01:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
private $packageName;
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
private $version;
|
|
|
|
public function __construct(string $packageName, string $version)
|
|
|
|
{
|
|
|
|
$this->packageName = $packageName;
|
|
|
|
$this->version = $version;
|
|
|
|
}
|
2021-05-09 20:15:43 +00:00
|
|
|
public function getPackageName() : string
|
2021-01-16 13:23:37 +01:00
|
|
|
{
|
|
|
|
return $this->packageName;
|
|
|
|
}
|
2021-05-09 20:15:43 +00:00
|
|
|
public function getVersion() : string
|
2021-01-16 13:23:37 +01:00
|
|
|
{
|
|
|
|
return $this->version;
|
|
|
|
}
|
|
|
|
}
|