Completed
Pull Request — master (#8)
by Sérgio
04:54
created
examples/range.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
 $scores = new F\Collection(range(1, 10));
8 8
 
9 9
 $x = $scores
10
-    ->map(function ($x) {
10
+    ->map(function($x) {
11 11
         return $x * 3;
12 12
     })
13
-    ->filter(function ($x) {
13
+    ->filter(function($x) {
14 14
         return $x % 2 === 0;
15 15
     })
16
-    ->reduce(function ($acc, $x) {
16
+    ->reduce(function($acc, $x) {
17 17
         return $acc + $x;
18 18
     });
19 19
 
Please login to merge, or discard this patch.
src/flatten.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
  */
14 14
 function flatten(array $xs)
15 15
 {
16
-    return array_reduce($xs, function ($carry, $x) {
16
+    return array_reduce($xs, function($carry, $x) {
17 17
         if (is_array($x)) {
18 18
             return array_merge($carry, flatten($x));
19 19
         }
Please login to merge, or discard this patch.
src/dropwhile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 {
14 14
     $args = func_get_args();
15 15
 
16
-    $dropwhile = function (callable $condition, array $xss) {
16
+    $dropwhile = function(callable $condition, array $xss) {
17 17
         if ([] === $xss) {
18 18
             return [];
19 19
         }
Please login to merge, or discard this patch.
src/takewhile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 {
13 13
     $args = func_get_args();
14 14
 
15
-    $takewhile = function (callable $condition, array $xss) {
15
+    $takewhile = function(callable $condition, array $xss) {
16 16
         if ([] === $xss) {
17 17
             return [];
18 18
         }
Please login to merge, or discard this patch.
src/pipe.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@
 block discarded – undo
16 16
 {
17 17
     $args = func_get_args();
18 18
 
19
-    return array_reduce($args, function ($carry, $fn) {
19
+    return array_reduce($args, function($carry, $fn) {
20 20
         if (null === $carry) {
21 21
             return $fn;
22 22
         }
23 23
 
24
-        return function () use ($carry, $fn) {
24
+        return function() use ($carry, $fn) {
25 25
             $args = func_get_args();
26 26
 
27 27
             return $fn(call_user_func_array($carry, $args));
Please login to merge, or discard this patch.
src/always.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  */
12 12
 function always($x)
13 13
 {
14
-    return function () use ($x) {
14
+    return function() use ($x) {
15 15
         return $x;
16 16
     };
17 17
 }
Please login to merge, or discard this patch.
src/sort.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
 
20 20
     $pivot = head($xss);
21 21
     $xs = tail($xss);
22
-    $left = array_filter($xs, function ($x) use ($pivot) {
22
+    $left = array_filter($xs, function($x) use ($pivot) {
23 23
         return $x < $pivot;
24 24
     });
25
-    $right = array_filter($xs, function ($x) use ($pivot) {
25
+    $right = array_filter($xs, function($x) use ($pivot) {
26 26
         return $x > $pivot;
27 27
     });
28 28
 
Please login to merge, or discard this patch.
src/deleteat.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     $args = func_get_args();
10 10
 
11
-    $deleteat = function ($n, array $xs) {
11
+    $deleteat = function($n, array $xs) {
12 12
         if ($n > 0) {
13 13
             return array_merge(take($n, $xs), drop($n + 1, $xs));
14 14
         }
Please login to merge, or discard this patch.