<?php
namespace Symfony\Component\DependencyInjection\Argument;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
class ServiceClosureArgument implements ArgumentInterface
{
use ArgumentTrait;
private array $values;
public function __construct(mixed $value)
{
$this->values = [$value];
}
public function getValues(): array
{
return $this->values;
}
public function setValues(array $values): void
{
if ([0] !== array_keys($values)) {
throw new InvalidArgumentException('A ServiceClosureArgument must hold one and only one value.');
}
$this->values = $values;
}
}