Passed
Push — master ( 8dfcb3...e5c791 )
by Radosław
02:07
created
src/macros/fn/unapply.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('unapply', function (callable $fn, ...$args) {
6
+P::macro('unapply', function(callable $fn, ...$args) {
7 7
     return $fn($args);
8 8
 });
Please login to merge, or discard this patch.
src/macros/fn/swap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('swap', function (callable $f): \Closure {
7
-    return function ($second, $first, ...$tail) use ($f) {
6
+P::macro('swap', function(callable $f): \Closure {
7
+    return function($second, $first, ...$tail) use ($f) {
8 8
         $arguments = array_merge([$first, $second], $tail);
9 9
         return $f(...$arguments);
10 10
     };
Please login to merge, or discard this patch.
src/macros/fn/of.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('of', function ($value): array {
6
+P::macro('of', function($value): array {
7 7
     return [$value];
8 8
 });
Please login to merge, or discard this patch.
src/macros/fn/negate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('negate', function (callable $predicate): \Closure {
7
-    return function (...$args) use ($predicate) {
6
+P::macro('negate', function(callable $predicate): \Closure {
7
+    return function(...$args) use ($predicate) {
8 8
         return !$predicate(...$args);
9 9
     };
10 10
 });
Please login to merge, or discard this patch.
src/macros/fn/always.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('always', function ($value): \Closure {
7
-    return function () use ($value) {
6
+P::macro('always', function($value): \Closure {
7
+    return function() use ($value) {
8 8
         return $value;
9 9
     };
10 10
 });
Please login to merge, or discard this patch.
src/macros/fn/identity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('identity', function ($value) {
6
+P::macro('identity', function($value) {
7 7
     return $value;
8 8
 });
Please login to merge, or discard this patch.
src/macros/logic/both.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@  discard block
 block discarded – undo
7 7
 load_macro('type', 'is');
8 8
 load_macro('logic', 'cond');
9 9
 
10
-P::macro('both', call_user_func(function () {
10
+P::macro('both', call_user_func(function() {
11 11
     $allPrimitives = P::unapply(P::all(P::is('bool')));
12 12
     $allCallables = P::unapply(P::all(P::is('callable')));
13 13
 
14
-    $bothPredicate = function ($left, $right) {
15
-        return function (...$args) use ($left, $right) {
14
+    $bothPredicate = function($left, $right) {
15
+        return function(...$args) use ($left, $right) {
16 16
             return $left(...$args) && $right(...$args);
17 17
         };
18 18
     };
19 19
 
20
-    $compareBooleans = function ($left, $right) {
20
+    $compareBooleans = function($left, $right) {
21 21
         return $left && $right;
22 22
     };
23 23
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         [P::otherwise(), P::throwException(\InvalidArgumentException::class, [])],
28 28
     ]);
29 29
 
30
-    return function ($left, $right) use ($both) {
30
+    return function($left, $right) use ($both) {
31 31
         return $both($left, $right);
32 32
     };
33 33
 }));
Please login to merge, or discard this patch.
src/macros/logic/either.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@  discard block
 block discarded – undo
6 6
 
7 7
 load_macro('type', 'is');
8 8
 
9
-P::macro('either', call_user_func(function () {
9
+P::macro('either', call_user_func(function() {
10 10
     $allPrimitives = P::unapply(P::all(P::is('bool')));
11 11
     $allCallables = P::unapply(P::all(P::is('callable')));
12 12
 
13
-    $compareBooleans = function ($left, $right) {
13
+    $compareBooleans = function($left, $right) {
14 14
         return $left || $right;
15 15
     };
16 16
 
17
-    $eitherPredicate = function ($left, $right) {
18
-        return function (...$args) use ($left, $right) {
17
+    $eitherPredicate = function($left, $right) {
18
+        return function(...$args) use ($left, $right) {
19 19
             return $left(...$args) || $right(...$args);
20 20
         };
21 21
     };
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         [P::otherwise(), P::throwException(\InvalidArgumentException::class, [])],
27 27
     ]);
28 28
 
29
-    return function ($left, $right) use ($either) {
29
+    return function($left, $right) use ($either) {
30 30
         return $either($left, $right);
31 31
     };
32 32
 }));
Please login to merge, or discard this patch.
src/macros/collection/collapse.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
 load_macro('collection', 'reduce');
9 9
 
10 10
 P::macro('collapse', P::reduce(
11
-    function ($carry, $item) {
11
+    function($carry, $item) {
12 12
         return is_array($item)
13 13
             ? array_merge($carry, $item)
14 14
             : P::append($item, $carry);
Please login to merge, or discard this patch.