Skip to content

Commit

Permalink
Adding null params to allow empty calls to methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkhill committed Mar 21, 2016
1 parent 49d8a29 commit e52d3b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Duration.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private function output()
return $out;
}

public function toSeconds($timeStr)
public function toSeconds($timeStr = null)
{
if (! is_null($timeStr)) {
$this->parse($timeStr);
Expand All @@ -110,7 +110,7 @@ public function toSeconds($timeStr)
return $this->output();
}

public function formatted($timeStr)
public function formatted($timeStr = null)
{
if (! is_null($timeStr)) {
$this->parse($timeStr);
Expand Down Expand Up @@ -147,7 +147,7 @@ public function formatted($timeStr)
return $this->output();
}

public function humanize($timeStr)
public function humanize($timeStr = null)
{
if (! is_null($timeStr)) {
$this->parse($timeStr);
Expand Down

0 comments on commit e52d3b9

Please sign in to comment.