@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public static function fromReturn($callback, array $arguments = [], $noneValue = null) |
| 88 | 88 | { |
| 89 | - return new LazyOption(function () use ($callback, $arguments, $noneValue) { |
|
| 89 | + return new LazyOption(function() use ($callback, $arguments, $noneValue) { |
|
| 90 | 90 | $return = call_user_func_array($callback, $arguments); |
| 91 | 91 | |
| 92 | 92 | if ($return === $noneValue) { |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | if ($value instanceof self) { |
| 117 | 117 | return $value; |
| 118 | 118 | } elseif (is_callable($value)) { |
| 119 | - return new LazyOption(function () use ($value, $noneValue) { |
|
| 119 | + return new LazyOption(function() use ($value, $noneValue) { |
|
| 120 | 120 | $return = $value(); |
| 121 | 121 | |
| 122 | 122 | if ($return instanceof self) { |
@@ -151,13 +151,13 @@ discard block |
||
| 151 | 151 | $args = func_get_args(); |
| 152 | 152 | |
| 153 | 153 | // if at least one parameter is empty, return None |
| 154 | - if (array_reduce($args, function ($status, Option $o) { |
|
| 154 | + if (array_reduce($args, function($status, Option $o) { |
|
| 155 | 155 | return $o->isEmpty() ? true : $status; |
| 156 | 156 | }, false)) { |
| 157 | 157 | return None::create(); |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | - $args = array_map(function (Option $o) { |
|
| 160 | + $args = array_map(function(Option $o) { |
|
| 161 | 161 | // it is safe to do so because the fold above checked |
| 162 | 162 | // that all arguments are of type Some |
| 163 | 163 | return $o->get(); |