Completed
Branch master (65ca3f)
by Radosław
04:52
created
Category
src/logic/both.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@
 block discarded – undo
Please login to merge, or discard this patch.
src/fn/curryN.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@
 block discarded – undo
24 24
  */
25 25
 function curryN(int $n, callable $fn, array $args = [])
26 26
 {
27
-    $argumentsLengthMatch = function (array $arguments) use ($n) {
27
+    $argumentsLengthMatch = function(array $arguments) use ($n) {
28 28
         return count($arguments) >= $n;
29 29
     };
30 30
 
31
-    $wrapper = function (...$wrapperArguments) use ($fn, $args, $argumentsLengthMatch, $n) {
31
+    $wrapper = function(...$wrapperArguments) use ($fn, $args, $argumentsLengthMatch, $n) {
32 32
         $combined = array_merge($args, $wrapperArguments);
33 33
         return $argumentsLengthMatch($combined) ? $fn(...$combined) : curryN($n, $fn, $combined);
34 34
     };
Please login to merge, or discard this patch.
src/fn/throwException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
  */
22 22
 function throwException(string $exception = \Exception::class, array $args = []): \Closure
23 23
 {
24
-    return function () use ($exception, $args) {
24
+    return function() use ($exception, $args) {
25 25
         throw new $exception(...$args);
26 26
     };
27 27
 }
Please login to merge, or discard this patch.
src/fn/partialRight.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 
32 32
 function 
Please login to merge, or discard this patch.
src/fn/negate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
  */
22 22
 function negate(callable $predicate): \Closure
23 23
 {
24
-    return function (...$args) use ($predicate) {
24
+    return function(...$args) use ($predicate) {
25 25
         return !$predicate(...$args);
26 26
     };
27 27
 }
Please login to merge, or discard this patch.
src/fn/partial.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
 function 
Please login to merge, or discard this patch.
src/fn/swap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
  */
21 21
 function swap(callable $f): \Closure
22 22
 {
23
-    return function ($second, $first, ...$tail) use ($f) {
23
+    return function($second, $first, ...$tail) use ($f) {
24 24
         $arguments = array_merge([$first, $second], $tail);
25 25
         return $f(...$arguments);
26 26
     };
Please login to merge, or discard this patch.
src/fn/always.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
  */
20 20
 function always($value): \Closure
21 21
 {
22
-    return function () use ($value) {
22
+    return function() use ($value) {
23 23
         return $value;
24 24
     };
25 25
 }
Please login to merge, or discard this patch.
src/fn/pipe.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@
 block discarded – undo
23 23
         throw new \UnderflowException('pipe requires at least one argument');
24 24
     }
25 25
 
26
-    return function (...$args) use ($fns) {
26
+    return function(...$args) use ($fns) {
27 27
         $head = $fns[0];
28 28
         $tail = array_slice($fns, 1);
29 29
 
30
-        return array_reduce($tail, function ($carry, callable $fn) {
30
+        return array_reduce($tail, function($carry, callable $fn) {
31 31
             return $fn($carry);
32 32
         }, $head(... $args));
33 33
     };
Please login to merge, or discard this patch.