Completed
Pull Request — master (#14)
by Paweł
04:02
created
src/Scalp/PatternMatching/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;
6 6
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             ->filter(papply(isInstanceOfType, __, $this->type));
33 33
 
34 34
         if (empty($this->patterns)) {
35
-            return $typeMatch->flatMap(function (): Option { return Some([]); });
35
+            return $typeMatch->flatMap(function(): Option { return Some([]); });
36 36
         }
37 37
 
38 38
         /** @var TryCatch $caseClass */
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                 );
45 45
 
46 46
         return $caseClass
47
-                ->map(function (CaseClass $cc): array { return $cc->deconstruct(); })
47
+                ->map(function(CaseClass $cc): array { return $cc->deconstruct(); })
48 48
                 ->map(papply(\Closure::fromCallable([$this, 'applyConstructorArgumentsPatterns']), __, $this->patterns))
49 49
                 ->get();
50 50
     }
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.