@@ -4,7 +4,7 @@ |
||
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | use function Baethon\Phln\assert_object; |
6 | 6 | |
7 | -P::macro('merge', function ($left, $right): array { |
|
7 | +P::macro('merge', function($left, $right): array { |
|
8 | 8 | assert_object($left); |
9 | 9 | assert_object($right); |
10 | 10 |
@@ -4,7 +4,7 @@ |
||
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | use function Baethon\Phln\assert_object; |
6 | 6 | |
7 | -P::macro('toPairs', function ($object): array { |
|
7 | +P::macro('toPairs', function($object): array { |
|
8 | 8 | assert_object($object); |
9 | 9 | |
10 | 10 | $pairs = []; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | use function Baethon\Phln\assert_object; |
6 | 6 | |
7 | -P::macro('values', function ($object): array { |
|
7 | +P::macro('values', function($object): array { |
|
8 | 8 | assert_object($object); |
9 | 9 | |
10 | 10 | return array_values((array) $object); |
@@ -4,7 +4,7 @@ |
||
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | use function Baethon\Phln\assert_object; |
6 | 6 | |
7 | -P::macro('keys', function ($object): array { |
|
7 | +P::macro('keys', function($object): array { |
|
8 | 8 | assert_object($object); |
9 | 9 | |
10 | 10 | $value = is_object($object) |
@@ -4,13 +4,13 @@ |
||
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | use function Baethon\Phln\assert_object; |
6 | 6 | |
7 | -P::macro('props', function (array $props, $object): array { |
|
7 | +P::macro('props', function(array $props, $object): array { |
|
8 | 8 | assert_object($object); |
9 | 9 | |
10 | 10 | $getProp = P::partial(P::ref('prop'), [P::__, $object]); |
11 | 11 | |
12 | 12 | return P::reduce( |
13 | - function ($carry, $prop) use ($getProp) { |
|
13 | + function($carry, $prop) use ($getProp) { |
|
14 | 14 | return P::append($getProp($prop), $carry); |
15 | 15 | }, |
16 | 16 | [], |
@@ -4,7 +4,7 @@ |
||
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | use function Baethon\Phln\assert_object; |
6 | 6 | |
7 | -P::macro('prop', function ($key, $object) { |
|
7 | +P::macro('prop', function($key, $object) { |
|
8 | 8 | assert_object($object); |
9 | 9 | |
10 | 10 | return is_object($object) |
@@ -4,7 +4,7 @@ |
||
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | use function Baethon\Phln\assert_object; |
6 | 6 | |
7 | -P::macro('propEq', function (string $prop, $value, $object): bool { |
|
7 | +P::macro('propEq', function(string $prop, $value, $object): bool { |
|
8 | 8 | assert_object($object); |
9 | 9 | |
10 | 10 | return P::apply( |
@@ -3,8 +3,8 @@ |
||
3 | 3 | |
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | |
6 | -P::macro('invoker', function (int $arity, string $method): \Closure { |
|
7 | - $wrapper = function (...$args) use ($arity, $method) { |
|
6 | +P::macro('invoker', function(int $arity, string $method): \Closure { |
|
7 | + $wrapper = function(...$args) use ($arity, $method) { |
|
8 | 8 | $args = array_slice($args, 0, $arity + 1); |
9 | 9 | $object = array_pop($args); |
10 | 10 |