Completed
Pull Request — master (#14)
by Paweł
10:32
created
example/pattern-matching.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
 require_once __DIR__.'/../vendor/autoload.php';
6 6
 
Please login to merge, or discard this patch.
src/Scalp/PatternMatching/Pattern/Type.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
 namespace Scalp\PatternMatching\Pattern;
6 6
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             ->filter(papply(isInstanceOfType, __, $this->type));
38 38
 
39 39
         if ($typeMatch->isEmpty() || empty($this->patterns)) {
40
-            return $typeMatch->flatMap(function (): Option { return Some([]); });
40
+            return $typeMatch->flatMap(function(): Option { return Some([]); });
41 41
         }
42 42
 
43 43
         /** @var TryCatch $caseClass */
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
                 );
50 50
 
51 51
         return $caseClass
52
-                ->map(function (CaseClass $cc): array { return $cc->deconstruct(); })
52
+                ->map(function(CaseClass $cc): array { return $cc->deconstruct(); })
53 53
                 ->map(papply(\Closure::fromCallable([$this, 'applyConstructorArgumentsPatterns']), type($x), __, $this->patterns))
54 54
                 ->get();
55 55
     }
Please login to merge, or discard this patch.