Completed
Pull Request — master (#8)
by Sérgio
04:54
created
src/each.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
     $args = func_get_args();
13 13
 
14
-    $each = function (callable $fn, array $xs) {
14
+    $each = function(callable $fn, array $xs) {
15 15
         array_walk($xs, $fn);
16 16
         return $xs;
17 17
     };
Please login to merge, or discard this patch.
src/filter.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
-    $filter = function (callable $fn, array $xs) {
16
+    $filter = function(callable $fn, array $xs) {
17 17
         return array_filter($xs, $fn);
18 18
     };
19 19
 
Please login to merge, or discard this patch.
src/take.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
     $args = func_get_args();
13 13
 
14
-    $take = function ($n, array $xs) {
14
+    $take = function($n, array $xs) {
15 15
         return array_slice($xs, 0, $n);
16 16
     };
17 17
 
Please login to merge, or discard this patch.
src/concat.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
     $args = func_get_args();
13 13
 
14
-    $concat = function ($a, $b /* ...$args */) {
14
+    $concat = function($a, $b /* ...$args */) {
15 15
         $rest = array_slice(func_get_args(), 2);
16 16
 
17 17
         return call_user_func_array('array_merge', array_merge([$a, $b], $rest));
Please login to merge, or discard this patch.
src/gte.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
-    $gte = function ($a, $b) {
16
+    $gte = function($a, $b) {
17 17
         return $a >= $b;
18 18
     };
19 19
 
Please login to merge, or discard this patch.
src/ifelse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
 {
12 12
     $args = func_get_args();
13 13
 
14
-    $ifelse = function (callable $condition, callable $ontrue, callable $onfalse) {
15
-        return function ($x) use ($condition, $ontrue, $onfalse) {
14
+    $ifelse = function(callable $condition, callable $ontrue, callable $onfalse) {
15
+        return function($x) use ($condition, $ontrue, $onfalse) {
16 16
             if ($condition($x)) {
17 17
                 return $ontrue($x);
18 18
             }
Please login to merge, or discard this patch.
src/lte.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
-    $lte = function ($a, $b) {
16
+    $lte = function($a, $b) {
17 17
         return $a <= $b;
18 18
     };
19 19
 
Please login to merge, or discard this patch.
examples/pipe_native_funcs.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@
 block discarded – undo
10 10
 );
11 11
 
12 12
 $countries = F\pipe(
13
-    F\map(function ($x) {
13
+    F\map(function($x) {
14 14
         return $x['country'];
15 15
     }),
16 16
     $join
17 17
 );
18 18
 
19 19
 $cities = F\pipe(
20
-    F\map(function ($x) {
20
+    F\map(function($x) {
21 21
         return $x['cities'];
22 22
     }),
23 23
     $join
Please login to merge, or discard this patch.
src/hold.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@
 block discarded – undo
11 11
 {
12 12
     $args = func_get_args();
13 13
     $placeholder = pipe(
14
-        filter(function ($x) {
14
+        filter(function($x) {
15 15
             return _ === $x;
16 16
         }),
17 17
         'array_keys'
18 18
     );
19 19
 
20
-    $hold = function (callable $fn) use ($placeholder) {
20
+    $hold = function(callable $fn) use ($placeholder) {
21 21
         $args = array_slice(func_get_args(), 1);
22 22
         $ks = $placeholder($args);
23 23
 
24
-        return function ($x) use ($fn, $args, $ks) {
24
+        return function($x) use ($fn, $args, $ks) {
25 25
             if ([] === $ks) {
26 26
                 return call_user_func_array($fn, array_merge($args, [$x]));
27 27
             }
Please login to merge, or discard this patch.