private function checkPosition($position)
{
if ($position < 0 || $position > count($this->parameters)) {
throw new \InvalidArgumentException(sprintf('The position must be in the range [0, %d].', count($this->parameters)));
}
}