mirror of https://github.com/rectorphp/rector.git
25 lines
444 B
PHP
25 lines
444 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\Renaming\Collector;
|
|
|
|
final class RenamedNameCollector
|
|
{
|
|
/**
|
|
* @var string[]
|
|
*/
|
|
private $names = [];
|
|
public function add(string $name) : void
|
|
{
|
|
$this->names[] = $name;
|
|
}
|
|
public function has(string $name) : bool
|
|
{
|
|
return \in_array($name, $this->names, \true);
|
|
}
|
|
public function reset() : void
|
|
{
|
|
$this->names = [];
|
|
}
|
|
}
|