rector/rules/DependencyInjection/Collector/VariablesToPropertyFetchCollection.php
2022-06-07 08:22:29 +00:00

25 lines
579 B
PHP

<?php
declare (strict_types=1);
namespace Rector\DependencyInjection\Collector;
use PHPStan\Type\ObjectType;
final class VariablesToPropertyFetchCollection
{
/**
* @var array<string, ObjectType>
*/
private $variableNameAndType = [];
public function addVariableNameAndType(string $name, ObjectType $objectType) : void
{
$this->variableNameAndType[$name] = $objectType;
}
/**
* @return array<string, ObjectType>
*/
public function getVariableNamesAndTypes() : array
{
return $this->variableNameAndType;
}
}