Passed
Push — master ( 318ad6...152f46 )
by Graham
01:22
created
src/PhpOption/Option.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
@@ -146,17 +146,17 @@  discard block
 block discarded – undo
146 146
      */
147 147
     public static function lift($callback, $noneValue = null)
148 148
     {
149
-        return function () use ($callback, $noneValue) {
149
+        return function() use ($callback, $noneValue) {
150 150
             $args = func_get_args();
151 151
 
152 152
             // if at least one parameter is empty, return None
153
-            if (array_reduce($args, function ($status, self $o) {
153
+            if (array_reduce($args, function($status, self $o) {
154 154
                 return $o->isEmpty() ? true : $status;
155 155
             }, false)) {
156 156
                 return None::create();
157 157
             }
158 158
 
159
-            $args = array_map(function (self $o) {
159
+            $args = array_map(function(self $o) {
160 160
                 // it is safe to do so because the fold above checked
161 161
                 // that all arguments are of type Some
162 162
                 return $o->get();
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
      * @param callable $callback  The callback to evaluate.
90 90
      * @param array    $arguments The arguments for the callback.
91 91
      * @param N        $noneValue The value which should be considered "None";
92
-    *                             null by default.
92
+     *                             null by default.
93 93
      *
94 94
      * @return LazyOption<S>
95 95
      */
Please login to merge, or discard this patch.