Skip to content

Commit

Permalink
Remove code that is implemented in the parent class.
Browse files Browse the repository at this point in the history
These methods now exist in the base class.
  • Loading branch information
markstory committed Mar 27, 2017
1 parent 9860a55 commit 28361a7
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/Http/Cookie/RequestCookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,33 +37,4 @@ public static function createFromRequest(ServerRequestInterface $request, $cooki

return new static($cookies);
}

/**
* Checks if the collection has a cookie with the given name
*
* @param string $name Name of the cookie
* @return bool
*/
public function has($name)
{
$key = mb_strtolower($name);

return isset($this->cookies[$key]);
}

/**
* Get a cookie from the collection by name.
*
* @param string $name Name of the cookie to get
* @throws \InvalidArgumentException
* @return Cookie
*/
public function get($name)
{
if (!$this->has($name)) {
throw new InvalidArgumentException(sprintf('Cookie `%s` does not exist', $name));
}

return $this->cookies[mb_strtolower($name)];
}
}

0 comments on commit 28361a7

Please sign in to comment.