$value) { if (!is_string($value)) { throw new InvalidArgumentException("Parameter {$key} is not a string."); } } return $parameters; } }