Completed
Pull Request — master (#14)
by Paweł
06:48
created
src/Scalp/PatternMatching/UnresolvedMatchSubject.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Scalp\PatternMatching;
6 6
 
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
         return $pattern
12 12
             ->match($this->get())
13 13
             ->fold(
14
-                function (): MatchSubject { return $this; },
15
-                function ($result) use ($handler): MatchSubject { return new ResolvedMatchSubject($handler(...$result)); }
14
+                function(): MatchSubject { return $this; },
15
+                function($result) use ($handler): MatchSubject { return new ResolvedMatchSubject($handler(...$result)); }
16 16
             );
17 17
     }
18 18
 
19 19
     public function done(): void
20 20
     {
21
-        throw PatternMatchingSubjectNotFound::for($this->get());
21
+        throw PatternMatchingSubjectNotFound::for ($this->get());
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Scalp/PatternMatching/Deconstruction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Scalp\PatternMatching;
6 6
 
Please login to merge, or discard this patch.
src/Scalp/PatternMatching/CaseClass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Scalp\PatternMatching;
6 6
 
Please login to merge, or discard this patch.
src/Scalp/PatternMatching/MatchSubject.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Scalp\PatternMatching;
6 6
 
Please login to merge, or discard this patch.
src/Scalp/PatternMatching/ResolvedMatchSubject.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Scalp\PatternMatching;
6 6
 
Please login to merge, or discard this patch.
example/divide.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 require_once __DIR__.'/../vendor/autoload.php';
6 6
 
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 $dividend = TryCatch(delay('readInt', "Enter an Int that you'd like to divide: "));
24 24
 $divisor = TryCatch(delay('readInt', "Enter an Int that you'd like to divide by: "));
25 25
 
26
-$result = $dividend->flatMap(function (int $x) use ($divisor): TryCatch {
27
-    return $divisor->map(function (int $y) use ($x) {
26
+$result = $dividend->flatMap(function(int $x) use ($divisor): TryCatch {
27
+    return $divisor->map(function(int $y) use ($x) {
28 28
         return intdiv($x, $y);
29 29
     });
30 30
 });
Please login to merge, or discard this patch.
src/Scalp/Utils/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Scalp\Utils {
6 6
     function delay(callable $functionOrCodeBlock, ...$args): Delayed
Please login to merge, or discard this patch.
src/Scalp/PatternMatching/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Scalp\PatternMatching {
6 6
     use Scalp\PatternMatching\Pattern\Any;
Please login to merge, or discard this patch.
src/Scalp/PatternMatching/Pattern/Binding.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Scalp\PatternMatching\Pattern;
6 6
 
Please login to merge, or discard this patch.