diff --git a/src/DateTimeFormatter.php b/src/DateTimeFormatter.php index 6cde48a5..0b2c7acf 100644 --- a/src/DateTimeFormatter.php +++ b/src/DateTimeFormatter.php @@ -61,12 +61,12 @@ public function setFormat($format) * Set whether or not to throw an exception in the event that DateTime * cannot parse the input value * - * @param bool throwInvalidDateException + * @param bool $throwInvalidDateException * @return self */ - public function setThrowInvalidDateException(bool $throwInvalidDateException): self + public function setThrowInvalidDateException($throwInvalidDateException) { - $this->throwInvalidDateException = $throwInvalidDateException; + $this->throwInvalidDateException = (bool) $throwInvalidDateException; return $this; }