Completed
Branch master (a31674)
by Radosław
02:21
created
src/macros/logic/isEmpty.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('isEmpty', function ($value): bool {
6
+P::macro('isEmpty', function($value): bool {
7 7
     switch (gettype($value)) {
8 8
         case 'array':
9 9
             return [] === $value;
Please login to merge, or discard this patch.
src/macros/logic/not.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('not', function ($value): bool {
6
+P::macro('not', function($value): bool {
7 7
     return !$value;
8 8
 });
Please login to merge, or discard this patch.
src/macros/logic/defaultTo.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('defaultTo', function ($default, $value) {
6
+P::macro('defaultTo', function($default, $value) {
7 7
     return is_null($value) ? $default : $value;
8 8
 });
Please login to merge, or discard this patch.
src/macros/logic/ifElse.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('ifElse', function (callable $predicate, callable $onTrue, callable $onFalse): \Closure {
7
-    return function (...$args) use ($predicate, $onTrue, $onFalse) {
6
+P::macro('ifElse', function(callable $predicate, callable $onTrue, callable $onFalse): \Closure {
7
+    return function(...$args) use ($predicate, $onTrue, $onFalse) {
8 8
         return $predicate(...$args)
9 9
             ? $onTrue(...$args)
10 10
             : $onFalse(...$args);
Please login to merge, or discard this patch.
src/macros/string/split.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
4 4
 use Baethon\Phln\Phln as P;
5 5
 use Baethon\Phln\RegExp;
6 6
 
7
-P::macro('split', function ($delimiter, string $text): array {
7
+P::macro('split', function($delimiter, string $text): array {
8 8
     return preg_split((string) RegExp::of($delimiter), $text);
9 9
 });
Please login to merge, or discard this patch.
src/macros/string/match.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 use Baethon\Phln\RegExp;
5 5
 use Baethon\Phln\Phln as P;
6 6
 
7
-P::macro('match', function ($regexp, string $test) {
7
+P::macro('match', function($regexp, string $test) {
8 8
     $r = RegExp::of($regexp);
9 9
     $matches = $r->matchAll($test);
10 10
 
Please login to merge, or discard this patch.
src/macros/string/regexp.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
4 4
 use Baethon\Phln\RegExp;
5 5
 use Baethon\Phln\Phln as P;
6 6
 
7
-P::macro('regexp', function (string $regexp): RegExp {
7
+P::macro('regexp', function(string $regexp): RegExp {
8 8
     return RegExp::fromString($regexp);
9 9
 });
Please login to merge, or discard this patch.
src/macros/string/replace.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 use Baethon\Phln\RegExp;
5 5
 use Baethon\Phln\Phln as P;
6 6
 
7
-P::macro('replace', function ($regexp, string $replacement, string $text): string {
7
+P::macro('replace', function($regexp, string $replacement, string $text): string {
8 8
     $r = RegExp::of($regexp);
9 9
     $limit = $r->isGlobal() ? -1 : 1;
10 10
 
Please login to merge, or discard this patch.
src/macros/string/test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
4 4
 use Baethon\Phln\RegExp;
5 5
 use Baethon\Phln\Phln as P;
6 6
 
7
-P::macro('test', function ($regexp, string $string): bool {
7
+P::macro('test', function($regexp, string $string): bool {
8 8
     return RegExp::of($regexp)->test($string);
9 9
 });
Please login to merge, or discard this patch.