From 8636fed8f5e1e0fac841e604b545c7db4d42ac9d Mon Sep 17 00:00:00 2001 From: Julius Ijie Date: Fri, 23 Feb 2018 15:55:45 +0100 Subject: [PATCH] Removed boolean type declaration only available on PHP7 --- src/Valitron/Validator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Valitron/Validator.php b/src/Valitron/Validator.php index 6952586..74e41c6 100644 --- a/src/Valitron/Validator.php +++ b/src/Valitron/Validator.php @@ -1021,7 +1021,8 @@ class Validator * Should the validation stop a rule is failed * @param bool $stop */ - public function stopOnFirstFail(bool $stop) { + public function stopOnFirstFail($stop) { + if(!is_bool($stop)) throw new \InvalidArgumentException('Parameter of type boolean expected'); $this->stop_on_first_fail = $stop; }