Passed
Push — main ( c7f59e...4af661 )
by Jesse
01:39
created
src/Parsers/Text.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,6 +35,6 @@
 block discarded – undo
35 35
         if (str_starts_with($input, $this->text)) {
36 36
             return Ok::with($this->text, substr($input, $this->length));
37 37
         }
38
-        return Error::in(substr($input, strspn($input ^ $this->text, "\0")));
38
+        return Error::in(substr($input, strspn($input^$this->text, "\0")));
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
src/Parsers/Except.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         private Parser $parser,
21 21
     ) {}
22 22
 
23
-    public static function for(Parser|string $refusal, Parser|string $parser): Parser
23
+    public static function for (Parser|string $refusal, Parser|string $parser): Parser
24 24
     {
25 25
         return new self(Cast::asParser($refusal), Cast::asParser($parser));
26 26
     }
Please login to merge, or discard this patch.
src/Helpers/NonEmpty.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
     public static function result(Parser $parser): Parser
18 18
     {
19 19
         return FullyMap::the($parser, fn(Result $result) => empty($result->data()) ?
20
-            Error::in($result->unparsed()) :
21
-            $result
20
+            Error::in($result->unparsed()) : $result
22 21
         );
23 22
     }
24 23
 }
Please login to merge, or discard this patch.
src/Helpers/Between.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@
 block discarded – undo
37 37
         string $escape2 = null,
38 38
     ): Parser {
39 39
         return Between::these($from, $to, Join::the(Repeatable::parser(AllOrNothing::in(Either::of(
40
-            Map::the(($escape2 ?: $escape) . $escape, fn($x) => $escape),   // escaped escape
41
-            Join::the(Sequence::of(Ignore::the($escape), $to)),             // escaped end
42
-            Except::for($to, Any::symbol()),                                // anything else
40
+            Map::the(($escape2 ?: $escape) . $escape, fn($x) => $escape), // escaped escape
41
+            Join::the(Sequence::of(Ignore::the($escape), $to)), // escaped end
42
+            Except::for ($to, Any::symbol()), // anything else
43 43
         )))));
44 44
     }
45 45
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,9 @@
 block discarded – undo
39 39
         return Between::these($from, $to, Join::the(Repeatable::parser(AllOrNothing::in(Either::of(
40 40
             Map::the(($escape2 ?: $escape) . $escape, fn($x) => $escape),   // escaped escape
41 41
             Join::the(Sequence::of(Ignore::the($escape), $to)),             // escaped end
42
-            Except::for($to, Any::symbol()),                                // anything else
42
+            Except::for($to, Any::symbol()) {
43
+                ,                                // anything else
43 44
         )))));
45
+            }
44 46
     }
45 47
 }
Please login to merge, or discard this patch.
src/Helpers/AtMost.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@
 block discarded – undo
20 20
     public static function results(int $n, Parser $parser): Parser
21 21
     {
22 22
         return FullyMap::the($parser, fn(Result $result) => count($result->data()) > $n ?
23
-            Error::in(implode(array_slice($result->data(), $n)) . $result->unparsed()) :
24
-            $result
23
+            Error::in(implode(array_slice($result->data(), $n)) . $result->unparsed()) : $result
25 24
         );
26 25
     }
27 26
 }
Please login to merge, or discard this patch.
src/Helpers/AtLeast.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@
 block discarded – undo
18 18
     public static function results(int $n, Parser $parser): Parser
19 19
     {
20 20
         return FullyMap::the($parser, fn(Result $result) => count($result->data()) < $n ?
21
-            Error::in($result->unparsed()) :
22
-            $result
21
+            Error::in($result->unparsed()) : $result
23 22
         );
24 23
     }
25 24
 }
Please login to merge, or discard this patch.
src/Parser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 
64 64
     public function except(Parser|string $refusal): Parser
65 65
     {
66
-        return Except::for($refusal, $this);
66
+        return Except::for ($refusal, $this);
67 67
     }
68 68
 
69 69
     public function join(string $glue = ''): Parser
Please login to merge, or discard this patch.