diff --git a/src/Negotiation/AcceptHeader.php b/src/Negotiation/AcceptHeader.php index 3f5f8c5..0f63161 100644 --- a/src/Negotiation/AcceptHeader.php +++ b/src/Negotiation/AcceptHeader.php @@ -2,6 +2,17 @@ namespace Negotiation; +/** + * TODO: Add this methods in interface for next major version. + * + * @method string getNormalizedValue() + * @method string getValue() + * @method string getType() + * @method float getQuality() + * @method array getParameters() + * @method string|null getParameter(string $key, string|null $default = null) + * @method bool hasParameter(string $key) + */ interface AcceptHeader { } diff --git a/src/Negotiation/BaseAccept.php b/src/Negotiation/BaseAccept.php index a4663d2..7cc3908 100644 --- a/src/Negotiation/BaseAccept.php +++ b/src/Negotiation/BaseAccept.php @@ -20,7 +20,7 @@ abstract class BaseAccept private $value; /** - * @var array + * @var array */ private $parameters; @@ -82,7 +82,7 @@ public function getQuality() } /** - * @return array + * @return array */ public function getParameters() { @@ -90,10 +90,10 @@ public function getParameters() } /** - * @param string $key - * @param mixed $default + * @param string $key + * @param string|null $default * - * @return string|null + * @return string|null */ public function getParameter($key, $default = null) { @@ -103,7 +103,7 @@ public function getParameter($key, $default = null) /** * @param string $key * - * @return boolean + * @return bool */ public function hasParameter($key) { @@ -111,9 +111,9 @@ public function hasParameter($key) } /** + * @param string|null $acceptPart * - * @param string|null $acceptPart - * @return array + * @return array{string, array} */ private function parseParameters($acceptPart) { @@ -140,7 +140,7 @@ private function parseParameters($acceptPart) } /** - * @param string $parameters + * @param array $parameters * * @return string */