Completed
Push — master ( 901a39...1d8a90 )
by Radosław
07:24
created
src/macros/fn/pipe.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('pipe', function (...$fns): \Closure {
6
+P::macro('pipe', function(...$fns): \Closure {
7 7
     $fnsCount = count($fns);
8 8
 
9 9
     if (1 === $fnsCount && is_array($fns[0])) {
@@ -13,11 +13,11 @@  discard block
 block discarded – undo
13 13
 
14 14
     assert($fnsCount > 0, new \UnderflowException('pipe requires at least one argument'));
15 15
 
16
-    return function (...$args) use ($fns) {
16
+    return function(...$args) use ($fns) {
17 17
         $head = $fns[0];
18 18
         $tail = array_slice($fns, 1);
19 19
 
20
-        return array_reduce($tail, function ($carry, callable $fn) {
20
+        return array_reduce($tail, function($carry, callable $fn) {
21 21
             return $fn($carry);
22 22
         }, $head(... $args));
23 23
     };
Please login to merge, or discard this patch.
src/macros/object/hasMethod.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 
4 4
 use Baethon\Phln\Phln as P;
5 5
 
6
-P::macro('hasMethod', function ($method, $object) {
6
+P::macro('hasMethod', function($method, $object) {
7 7
     try {
8 8
         $reflection = new \ReflectionObject($object);
9 9
 
Please login to merge, or discard this patch.
src/Phln.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
      */
93 93
     public static function __callStatic($method, $parameters)
94 94
     {
95
-        if (! static::hasMacro($method)) {
95
+        if (!static::hasMacro($method)) {
96 96
             throw new \BadMethodCallException("Method {$method} does not exist.");
97 97
         }
98 98
 
Please login to merge, or discard this patch.
src/TrampolineThunk.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     {
23 23
         $fn = $this->fn;
24 24
 
25
-        return function () use ($args, $fn) {
25
+        return function() use ($args, $fn) {
26 26
             return $fn(...$args);
27 27
         };
28 28
     }
Please login to merge, or discard this patch.
src/macros/logic/cond.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use Baethon\Phln\Phln as P;
6 6
 
7
-P::macro('cond', function (array $pairs): \Closure {
8
-    return function (...$args) use ($pairs) {
7
+P::macro('cond', function(array $pairs): \Closure {
8
+    return function(...$args) use ($pairs) {
9 9
         $callPredicate = P::partialRight(P::apply(), [$args]);
10 10
         $pairMatchingArgs = P::compose($callPredicate, P::nth(0));
11 11
         $getTransformer = P::pipe(
Please login to merge, or discard this patch.
src/macros/relation/propEq.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 use function Baethon\Phln\assert_object;
8 8
 
9
-P::macro('propEq', function (string $prop, $value, $object): bool {
9
+P::macro('propEq', function(string $prop, $value, $object): bool {
10 10
     assert_object($object);
11 11
 
12 12
     return P::apply(
Please login to merge, or discard this patch.
src/macros/object/omit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 use function Baethon\Phln\assert_object;
8 8
 
9
-P::macro('omit', function (array $omitKeys, $object): array {
9
+P::macro('omit', function(array $omitKeys, $object): array {
10 10
     assert_object($object);
11 11
 
12 12
     return array_diff_key((array) $object, array_combine($omitKeys, $omitKeys) ?: []);
Please login to merge, or discard this patch.
src/macros/object/toPairs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 use function Baethon\Phln\assert_object;
8 8
 
9
-P::macro('toPairs', function ($object): array {
9
+P::macro('toPairs', function($object): array {
10 10
     assert_object($object);
11 11
 
12 12
     $pairs = [];
Please login to merge, or discard this patch.
src/macros/object/has.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 use function Baethon\Phln\assert_object;
8 8
 
9
-P::macro('has', function (string $prop, $object) {
9
+P::macro('has', function(string $prop, $object) {
10 10
     assert_object($object);
11 11
 
12 12
     return is_object($object)
Please login to merge, or discard this patch.