Skip to content

Commit

Permalink
Update docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
jenssegers committed Feb 21, 2017
1 parent 265e697 commit c2d10c2
Showing 1 changed file with 9 additions and 34 deletions.
43 changes: 9 additions & 34 deletions src/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static function make($time = null, $timezone = null)
}

/**
* Create a carbon instance from a string.
* Create a Date instance from a string.
*
* @param string $time
* @param string|DateTimeZone $timezone
Expand All @@ -80,13 +80,7 @@ public static function parse($time = null, $timezone = null)
}

/**
* Create a Carbon instance from a specific format.
*
* @param string $format
* @param string $time
* @param DateTimeZone|string $timezone
* @return static
* @throws InvalidArgumentException
* @inheritdoc
*/
public static function createFromFormat($format, $time, $timezone = null)
{
Expand All @@ -96,11 +90,7 @@ public static function createFromFormat($format, $time, $timezone = null)
}

/**
* Get the difference in a human readable format.
*
* @param Date $since
* @param bool $absolute Removes time difference modifiers ago, after, etc
* @return string
* @inheritdoc
*/
public function diffForHumans(Carbon $since = null, $absolute = false, $short = false)
{
Expand Down Expand Up @@ -308,10 +298,7 @@ public function timespan($time = null, $timezone = null)
}

/**
* Adds an amount of days, months, years, hours, minutes and seconds to a Date object.
*
* @param string|DateInterval $interval
* @return Date
* @inheritdoc
*/
public function add($interval)
{
Expand All @@ -328,10 +315,7 @@ public function add($interval)
}

/**
* Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object.
*
* @param string|DateInterval $interval
* @return Date
* @inheritdoc
*/
public function sub($interval)
{
Expand All @@ -348,20 +332,15 @@ public function sub($interval)
}

/**
* Get the current translator locale.
*
* @return string
* @inheritdoc
*/
public static function getLocale()
{
return static::getTranslator()->getLocale();
}

/**
* Set the current locale.
*
* @param string $locale
* @return void
* @inheritdoc
*/
public static function setLocale($locale)
{
Expand Down Expand Up @@ -405,9 +384,7 @@ public static function getFallbackLocale()
}

/**
* Return the Translator implementation.
*
* @return Translator
* @inheritdoc
*/
public static function getTranslator()
{
Expand All @@ -421,9 +398,7 @@ public static function getTranslator()
}

/**
* Set the Translator implementation.
*
* @param Translator $translator
* @inheritdoc
*/
public static function setTranslator(TranslatorInterface $translator)
{
Expand Down

0 comments on commit c2d10c2

Please sign in to comment.