diff --git a/composer.json b/composer.json index bd58070..34ee9f5 100644 --- a/composer.json +++ b/composer.json @@ -12,10 +12,10 @@ "psr-4": {"JJWare\\Utils\\Option\\": "src"} }, "require": { - "php": ">=7.1.0" + "php": ">=7.0.0" }, "require-dev": { - "phpUnit/phpUnit": "^7.1" + "phpUnit/phpUnit": "^6.5" } } \ No newline at end of file diff --git a/src/None.php b/src/None.php index 413861e..0cafc71 100644 --- a/src/None.php +++ b/src/None.php @@ -28,7 +28,7 @@ public function getOrThrow(callable $f) throw call_user_func($f); } - public function forEach(callable $f): void + public function forEach(callable $f) { // do nothing } diff --git a/src/Option.php b/src/Option.php index 5e5d645..10ac32b 100644 --- a/src/Option.php +++ b/src/Option.php @@ -9,7 +9,7 @@ public abstract function map(callable $f): Option; public abstract function getOrElseGet(callable $f); public abstract function getOrElse($default); public abstract function getOrThrow(callable $f); - public abstract function forEach(callable $f): void; + public abstract function forEach(callable $f); public abstract function isSome(): bool; public abstract function isNone(): bool; diff --git a/src/Some.php b/src/Some.php index a9bcc42..2ef778a 100644 --- a/src/Some.php +++ b/src/Some.php @@ -38,7 +38,7 @@ public function getOrThrow(callable $f) return $this->value; } - public function forEach(callable $f): void + public function forEach(callable $f) { call_user_func($f, $this->value); }