Skip to content
Permalink
Browse files

Remove redundant doc blocks.

Inherit documentation from the interface where possible.
  • Loading branch information...
markstory committed Sep 19, 2017
1 parent 173293f commit 98f4673f27bd4e3851818536796074946327517a
Showing with 20 additions and 77 deletions.
  1. +20 −77 src/Http/Cookie/Cookie.php
@@ -185,10 +185,7 @@ public function toHeaderValue()
}
/**
* Create a cookie with an updated name
*
* @param string $name Name of the cookie
* @return static
* {@inheritDoc}
*/
public function withName($name)
{
@@ -200,11 +197,7 @@ public function withName($name)
}
/**
* Get the id for a cookie
*
* Cookies are unique across name, domain, path tuples.
*
* @return string
* {@inheritDoc}
*/
public function getId()
{
@@ -214,9 +207,7 @@ public function getId()
}
/**
* Gets the cookie name
*
* @return string
* {@inheritDoc}
*/
public function getName()
{
@@ -245,20 +236,15 @@ protected function validateName($name)
}
/**
* Gets the cookie value
*
* @return string|array
* {@inheritDoc}
*/
public function getValue()
{
return $this->value;
}
/**
* Create a cookie with an updated value.
*
* @param string|array $value Value of the cookie to set
* @return static
* {@inheritDoc}
*/
public function withValue($value)
{
@@ -281,10 +267,7 @@ protected function _setValue($value)
}
/**
* Create a new cookie with an updated path
*
* @param string $path Sets the path
* @return static
* {@inheritDoc}
*/
public function withPath($path)
{
@@ -296,20 +279,15 @@ public function withPath($path)
}
/**
* Get the path attribute.
*
* @return string
* {@inheritDoc}
*/
public function getPath()
{
return $this->path;
}
/**
* Create a cookie with an updated domain
*
* @param string $domain Domain to set
* @return static
* {@inheritDoc}
*/
public function withDomain($domain)
{
@@ -321,9 +299,7 @@ public function withDomain($domain)
}
/**
* Get the domain attribute.
*
* @return string
* {@inheritDoc}
*/
public function getDomain()
{
@@ -348,20 +324,15 @@ protected function validateString($value)
}
/**
* Check if the cookie is secure
*
* @return bool
* {@inheritDoc}
*/
public function isSecure()
{
return $this->secure;
}
/**
* Create a cookie with Secure updated
*
* @param bool $secure Secure attribute value
* @return static
* {@inheritDoc}
*/
public function withSecure($secure)
{
@@ -373,10 +344,7 @@ public function withSecure($secure)
}
/**
* Create a cookie with HTTP Only updated
*
* @param bool $httpOnly HTTP Only
* @return static
* {@inheritDoc}
*/
public function withHttpOnly($httpOnly)
{
@@ -405,20 +373,15 @@ protected function validateBool($value)
}
/**
* Check if the cookie is HTTP only
*
* @return bool
* {@inheritDoc}
*/
public function isHttpOnly()
{
return $this->httpOnly;
}
/**
* Create a cookie with an updated expiration date
*
* @param \DateTime|\DateTimeImmutable $dateTime Date time object
* @return static
* {@inheritDoc}
*/
public function withExpiry($dateTime)
{
@@ -429,22 +392,15 @@ public function withExpiry($dateTime)
}
/**
* Get the current expiry time
*
* @return \DateTime|\DateTimeImmutable|null Timestamp of expiry or null
* {@inheritDoc}
*/
public function getExpiry()
{
return $this->expiresAt;
}
/**
* Get the timestamp from the expiration time
*
* Timestamps are strings as large timestamps can overflow MAX_INT
* in 32bit systems.
*
* @return string|null The expiry time as a string timestamp.
* {@inheritDoc}
*/
public function getExpiresTimestamp()
{
@@ -456,9 +412,7 @@ public function getExpiresTimestamp()
}
/**
* Builds the expiration value part of the header string
*
* @return string
* {@inheritDoc}
*/
public function getFormattedExpires()
{
@@ -470,12 +424,7 @@ public function getFormattedExpires()
}
/**
* Check if a cookie is expired when compared to $time
*
* Cookies without an expiration date always return false.
*
* @param \DateTime|\DateTimeImmutable $time The time to test against. Defaults to 'now' in UTC.
* @return bool
* {@inheritDoc}
*/
public function isExpired($time = null)
{
@@ -488,9 +437,7 @@ public function isExpired($time = null)
}
/**
* Create a new cookie that will virtually never expire.
*
* @return static
* {@inheritDoc}
*/
public function withNeverExpire()
{
@@ -501,11 +448,7 @@ public function withNeverExpire()
}
/**
* Create a new cookie that will expire/delete the cookie from the browser.
*
* This is done by setting the expiration time to 1 year ago
*
* @return static
* {@inheritDoc}
*/
public function withExpired()
{

0 comments on commit 98f4673

Please sign in to comment.
You can’t perform that action at this time.