Skip to content

Commit

Permalink
Update PHPDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Jul 16, 2024
1 parent 11c7fbc commit cb43747
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/Carbon/CarbonInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,7 @@ public function diffFiltered(CarbonInterval $ci, Closure $callback, $date = null
* ⦿ 'altNumbers' entry, use alternative numbers if available
* ` (from the current language if true is passed, from the given language(s)
* ` if array or string is passed)
* - 'join' entry determines how to join multiple parts of the string
* ⦿ 'join' entry determines how to join multiple parts of the string
* ` - if $join is a string, it's used as a joiner glue
* ` - if $join is a callable/closure, it get the list of string and should return a string
* ` - if $join is an array, the first item will be the default glue, and the second item
Expand All @@ -1635,7 +1635,9 @@ public function diffFiltered(CarbonInterval $ci, Closure $callback, $date = null
* ⦿ 'other' entry (see above)
* ⦿ 'minimumUnit' entry determines the smallest unit of time to display can be long or
* ` short form of the units, e.g. 'hour' or 'h' (default value: s)
* if int passed, it add modifiers:
* ⦿ 'locale' language in which the diff should be output (has no effect if 'translator' key is set)
* ⦿ 'translator' a custom translator to use to translator the output.
* if int passed, it adds modifiers:
* Possible values:
* - CarbonInterface::DIFF_ABSOLUTE no modifiers
* - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier
Expand Down Expand Up @@ -3200,7 +3202,7 @@ public static function macro(string $name, ?callable $macro): void;
*
* @return static|null
*/
public static function make($var);
public static function make($var, DateTimeZone|string|null $timezone = null);

/**
* Get the maximum instance between a given instance (default now) and the current instance.
Expand Down
2 changes: 1 addition & 1 deletion src/Carbon/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
* Support is considered enabled if the 4 sentences are translated in the given locale.
* @method bool localeHasShortUnits(string $locale) Returns true if the given locale is internally supported and has short-units support.
* Support is considered enabled if either year, day or hour has a short variant translated.
* @method ?Carbon make($var) Make a Carbon instance from given variable if possible.
* @method ?Carbon make($var, DateTimeZone|string|null $timezone = null) Make a Carbon instance from given variable if possible.
* Always return a new instance. Parse only strings and only these likely to be dates (skip intervals
* and recurrences). Throw an exception for invalid format, but otherwise return null.
* @method void mixin(object|string $mixin) Mix another object into the class.
Expand Down
2 changes: 1 addition & 1 deletion src/Carbon/FactoryImmutable.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
* Support is considered enabled if the 4 sentences are translated in the given locale.
* @method bool localeHasShortUnits(string $locale) Returns true if the given locale is internally supported and has short-units support.
* Support is considered enabled if either year, day or hour has a short variant translated.
* @method ?CarbonImmutable make($var) Make a Carbon instance from given variable if possible.
* @method ?CarbonImmutable make($var, DateTimeZone|string|null $timezone = null) Make a Carbon instance from given variable if possible.
* Always return a new instance. Parse only strings and only these likely to be dates (skip intervals
* and recurrences). Throw an exception for invalid format, but otherwise return null.
* @method void mixin(object|string $mixin) Mix another object into the class.
Expand Down

0 comments on commit cb43747

Please sign in to comment.