Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Fix undef var error
Browse files Browse the repository at this point in the history
  • Loading branch information
marcguyer committed Mar 14, 2019
1 parent 720375b commit eaf726c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DateTimeFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ public function setFormat($format)
* Set whether or not to throw an exception in the event that DateTime
* cannot parse the input value
*
* @param bool $throwException
* @param bool throwInvalidDateException
* @return self
*/
public function setThrowInvalidDateException(bool $throwException): self
public function setThrowInvalidDateException(bool $throwInvalidDateException): self
{
$this->throwInvalidDateException = $throwInvalidDateException;

Expand All @@ -83,7 +83,7 @@ public function filter($value)
try {
$result = $this->normalizeDateTime($value);
} catch (\Exception $e) {
if (!$this->throwInvalidDateException) {
if (! $this->throwInvalidDateException) {
return $value;
}
// DateTime threw an exception, an invalid date string was provided
Expand Down

0 comments on commit eaf726c

Please sign in to comment.