diff --git a/Message/RequestAbstract.php b/Message/RequestAbstract.php index abb4abcac..529c552aa 100644 --- a/Message/RequestAbstract.php +++ b/Message/RequestAbstract.php @@ -217,6 +217,20 @@ abstract class RequestAbstract implements MessageInterface return $this->data[$key] ?? null; } + /** + * Check if has data. + * + * @param mixed $key Data key + * + * @return bool + * + * @since 1.0.0 + */ + public function hasData($key) : bool + { + return isset($this->data[$key]); + } + /** * Set request data. *