protected final function addParameter($key, $value)
{
if (!is_scalar($value) && !is_array($value)) {
throw new \InvalidArgumentException(sprintf("Expected a scalar or array value for '%s'", $key));
}
$this->parameters[$key] = $value;
}