Completed
Pull Request — master (#13)
by Paweł
02:06
created
src/Scalp/Conversion/implicit_conversion.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\Conversion {
6 6
     function NullToString(): string
Please login to merge, or discard this patch.
src/Scalp/Exception/NoSuchElementException.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\Exception;
6 6
 
Please login to merge, or discard this patch.
src/Scalp/None.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;
6 6
 
Please login to merge, or discard this patch.
src/Scalp/Option.php 1 patch
Spacing   +2 added lines, -2 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;
6 6
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         return $this->isEmpty() || $p($this->get());
75 75
     }
76 76
 
77
-    final public function foreach(callable $f): void
77
+    final public function foreach (callable $f): void
78 78
     {
79 79
         $this->isEmpty() ?: $f($this->get());
80 80
     }
Please login to merge, or discard this patch.
example/option.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\Example {
6 6
     use function Scalp\None;
@@ -21,19 +21,19 @@  discard block
 block discarded – undo
21 21
 
22 22
     $option = Option(42);
23 23
 
24
-    $square = function (int $x): int {
24
+    $square = function(int $x): int {
25 25
         return $x ** 2;
26 26
     };
27 27
 
28 28
     println($option->map($square));
29 29
 
30
-    $isOdd = function (int $x): bool {
30
+    $isOdd = function(int $x): bool {
31 31
         return $x % 2 === 1;
32 32
     };
33 33
 
34 34
     println($option->filter($isOdd));
35 35
 
36
-    $squareRoot = function (int $x): Option {
36
+    $squareRoot = function(int $x): Option {
37 37
         return $x >= 0 ? Some(sqrt($x)) : None();
38 38
     };
39 39
 
Please login to merge, or discard this patch.
src/Scalp/Some.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;
6 6
 
Please login to merge, or discard this patch.
src/Scalp/PartialApplication.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;
6 6
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     {
29 29
         $argsIterator = new \ArrayIterator($arguments);
30 30
 
31
-        $replacePlaceholders = function ($arg) use ($argsIterator) {
31
+        $replacePlaceholders = function($arg) use ($argsIterator) {
32 32
             $replacement = $arg === __ && $argsIterator->valid()
33 33
                 ? $argsIterator->current()
34 34
                 : $arg;
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                 'Partially applied function has %d missing argument%s at position: %s.',
51 51
                 \count($placeholders),
52 52
                 \count($placeholders) > 1 ? 's' : '',
53
-                implode(', ', array_map(function (int $idx): int {
53
+                implode(', ', array_map(function(int $idx) : int {
54 54
                     return $idx + 1;
55 55
                 }, array_keys($placeholders)))
56 56
             ));
@@ -59,6 +59,6 @@  discard block
 block discarded – undo
59 59
 
60 60
     private function placeholderArguments(array $arguments): array
61 61
     {
62
-        return array_filter($arguments, function ($arg): bool { return $arg === __; });
62
+        return array_filter($arguments, function($arg): bool { return $arg === __; });
63 63
     }
64 64
 }
Please login to merge, or discard this patch.