Skip to content

Commit

Permalink
Fix signature of BusinessTime\Interval::forHumans
Browse files Browse the repository at this point in the history
  • Loading branch information
hughgrigg committed Aug 25, 2018
1 parent 0767c93 commit 8e53cc5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Interval.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ public function asMultipleOf(DateInterval $interval): float
* intervals is to use whichever arbitrary units they are specified in,
* leading to e.g. "480 minutes" instead of "8 hours".
*
* @param bool $short
*
* @return string
*/
public function forHumans(): string
public function forHumans($short = false): string
{
return (new Carbon())->add($this)->diffForHumans(null, true, false, 2);
return (new Carbon())->add($this)->diffForHumans(null, true, $short, 2);
}

/**
Expand Down

0 comments on commit 8e53cc5

Please sign in to comment.