mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 06:18:07 +01:00
503a6059f8
a8922f7431
skip temporarily match + throws downagrade in symfony/console, very unlikely to run
36 lines
682 B
PHP
36 lines
682 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\Naming\ValueObject;
|
|
|
|
final class ExpectedName
|
|
{
|
|
/**
|
|
* @readonly
|
|
* @var string
|
|
*/
|
|
private $name;
|
|
/**
|
|
* @readonly
|
|
* @var string
|
|
*/
|
|
private $singularized;
|
|
public function __construct(string $name, string $singularized)
|
|
{
|
|
$this->name = $name;
|
|
$this->singularized = $singularized;
|
|
}
|
|
public function getName() : string
|
|
{
|
|
return $this->name;
|
|
}
|
|
public function getSingularized() : string
|
|
{
|
|
return $this->singularized;
|
|
}
|
|
public function isSingular() : bool
|
|
{
|
|
return $this->name === $this->singularized;
|
|
}
|
|
}
|