Skip to content

Commit

Permalink
support PHP 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
senojj committed May 31, 2018
1 parent db32647 commit 6997693
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

2 changes: 1 addition & 1 deletion src/None.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion src/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Some.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 6997693

Please sign in to comment.