@@ -6,7 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | load_macro('fn', 'pipe'); |
| 8 | 8 | |
| 9 | -P::macro('compose', function (...$fns): \Closure { |
|
| 9 | +P::macro('compose', function(...$fns): \Closure { |
|
| 10 | 10 | $fnsCount = count($fns); |
| 11 | 11 | |
| 12 | 12 | if (1 === $fnsCount && is_array($fns[0])) { |
@@ -3,7 +3,7 @@ discard block |
||
| 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 |
||
| 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 | }; |
@@ -3,7 +3,7 @@ |
||
| 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 | |