Skip to content

Commit

Permalink
add missing docblocks in Cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
l0gicgate committed May 5, 2019
1 parent 155d308 commit 1e9abae
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions src/Cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,23 @@ public function setDefaults(array $settings)
}

/**
* {@inheritdoc}
* Get cookie
*
* @param string $name
* @param string|array|null $default
* @return mixed|null
*/
public function get(string $name, $default = null)
{
return isset($this->requestCookies[$name]) ? $this->requestCookies[$name] : $default;
}

/**
* {@inheritdoc}
* Set cookie
*
* @param string $name
* @param string|array $value
* @return static
*/
public function set(string $name, $value)
{
Expand All @@ -88,7 +96,9 @@ public function set(string $name, $value)
}

/**
* {@inheritdoc}
* Convert all response cookies into an associate array of header values
*
* @return array
*/
public function toHeaders(): array
{
Expand Down Expand Up @@ -153,7 +163,13 @@ protected function toHeader(string $name, array $properties): string
}

/**
* {@inheritdoc}
* Parse cookie values from header value
*
* Returns an associative array of cookie names and values
*
* @param string|array $header
*
* @return array
*/
public static function parseHeader($header): array
{
Expand Down

0 comments on commit 1e9abae

Please sign in to comment.