adyen-php-api-library
adyen-php-api-library copied to clipboard
Wrong parameter type in metadata functions
In this function, the parameter type also includes null. but it should not be null.
Could there be just no action if it is null?
/**
* Sets metadata
*
* @param array<string,string>|null $metadata Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. * Maximum 20 characters per key. * Maximum 80 characters per value.
*
* @return self
*/
public function setMetadata($metadata)
{
if (is_null($metadata)) {
throw new \InvalidArgumentException('non-nullable metadata cannot be null');
}
$this->container['metadata'] = $metadata;
return $this;
}
PS: it is in all setMetadata functions.