Completed
Pull Request — master (#4)
by Siwapun
21:56 queued 06:35
created
test/FilterTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@
 block discarded – undo
8 8
 {
9 9
   public function testFilter()
10 10
   {
11
-    $isEven = function ($it) {
11
+    $isEven = function($it) {
12 12
       return $it % 2 == 0;
13 13
     };
14
-    $this->assertEquals([2,4,6], filter($isEven)([1,2,3,4,5,6]));
14
+    $this->assertEquals([2, 4, 6], filter($isEven)([1, 2, 3, 4, 5, 6]));
15 15
   }
16 16
 }
Please login to merge, or discard this patch.
test/ReduceTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@
 block discarded – undo
8 8
 {
9 9
   public function testReduce()
10 10
   {
11
-    $add = function ($a, $b) {
11
+    $add = function($a, $b) {
12 12
       return $a + $b;
13 13
     };
14
-    $this->assertEquals(15, reduce($add)(0)([1,2,3,4,5]));
14
+    $this->assertEquals(15, reduce($add)(0)([1, 2, 3, 4, 5]));
15 15
   }
16 16
 }
Please login to merge, or discard this patch.
test/MapTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
   public function testMap()
10 10
   {
11 11
     $array = [1, 2, 3, 4];
12
-    $add10 = function ($it) {
12
+    $add10 = function($it) {
13 13
       return $it + 10;
14 14
     };
15 15
     $this->assertEquals([11, 12, 13, 14], map($add10)($array));
Please login to merge, or discard this patch.
test/FilterPreserveKeyTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@
 block discarded – undo
8 8
 {
9 9
   public function testFilter()
10 10
   {
11
-    $isEven = function ($it) {
11
+    $isEven = function($it) {
12 12
       return $it % 2 == 0;
13 13
     };
14
-    $this->assertEquals([1 => 2, 3 => 4, 5 => 6], filterPreserveKey($isEven)([1,2,3,4,5,6]));
14
+    $this->assertEquals([1 => 2, 3 => 4, 5 => 6], filterPreserveKey($isEven)([1, 2, 3, 4, 5, 6]));
15 15
   }
16 16
 }
Please login to merge, or discard this patch.
test/ComposeTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@
 block discarded – undo
25 25
   public function testComposeMultipleMethods()
26 26
   {
27 27
     $composed = compose(
28
-      function ($i) {
28
+      function($i) {
29 29
         return $i * 10;
30 30
       },
31
-      function ($a, $b) {
31
+      function($a, $b) {
32 32
         return $a + $b;
33 33
       }
34 34
     );
Please login to merge, or discard this patch.
test/AllTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 {
9 9
   public function testAllAndExpectTrue()
10 10
   {
11
-    $lessThan10 = function ($it) {
11
+    $lessThan10 = function($it) {
12 12
       return $it < 10;
13 13
     };
14 14
     $this->assertTrue(all($lessThan10)([1, 2, 3, 4]));
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
   public function testAllAndExpectFalse()
18 18
   {
19
-    $lessThan10 = function ($it) {
19
+    $lessThan10 = function($it) {
20 20
       return $it < 10;
21 21
     };
22 22
     $this->assertFalse(all($lessThan10)([1, 2, 3, 4, 20]));
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
   public function testAllWithEmptyArray()
26 26
   {
27
-    $predicate = function ($it) {
27
+    $predicate = function($it) {
28 28
       return true;
29 29
     };
30 30
     $this->assertFalse(all($predicate)([]));
Please login to merge, or discard this patch.
test/AnyTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
   public function testAnyAndExpectTrue()
11 11
   {
12
-    $lessThan2 = function ($it) {
12
+    $lessThan2 = function($it) {
13 13
       return $it < 2;
14 14
     };
15 15
     $this->assertTrue(any($lessThan2)([1, 2, 3, 4]));
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
   public function testAnyAndExpectFalse()
19 19
   {
20
-    $lessThan2 = function ($it) {
20
+    $lessThan2 = function($it) {
21 21
       return $it < 2;
22 22
     };
23 23
     $this->assertFalse(any($lessThan2)([3, 4, 5, 6]));
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
   public function testAnyWithEmptyArray()
27 27
   {
28
-    $predicate = function ($it) {
28
+    $predicate = function($it) {
29 29
       return true;
30 30
     };
31 31
     $this->assertFalse(any($predicate)([]));
Please login to merge, or discard this patch.
test/CurryNTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,20 +10,20 @@
 block discarded – undo
10 10
   public function testCurryNWithInvokeFunctionDirectly()
11 11
   {
12 12
     $curriedReduce = curryN('array_reduce', 3);
13
-    $add = function ($a, $b) {
13
+    $add = function($a, $b) {
14 14
       return $a + $b;
15 15
     };
16
-    $result = $curriedReduce([4,5,6], $add, 0);
16
+    $result = $curriedReduce([4, 5, 6], $add, 0);
17 17
     $this->assertEquals(15, $result);
18 18
   }
19 19
 
20 20
   public function testCurryNWithAutoCurry()
21 21
   {
22 22
     $curriedReduce = curryN('array_reduce', 3);
23
-    $add = function ($a, $b) {
23
+    $add = function($a, $b) {
24 24
       return $a + $b;
25 25
     };
26
-    $result = $curriedReduce([4,5,6])($add)(0);
26
+    $result = $curriedReduce([4, 5, 6])($add)(0);
27 27
     $this->assertEquals(15, $result);
28 28
   }
29 29
 }
Please login to merge, or discard this patch.
test/PipeTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@
 block discarded – undo
25 25
   public function testPipeMultipleMethods()
26 26
   {
27 27
     $piped = pipe(
28
-      function ($a, $b) {
28
+      function($a, $b) {
29 29
         return $a + $b;
30 30
       },
31
-      function ($i) {
31
+      function($i) {
32 32
         return $i * 10;
33 33
       }
34 34
     );
Please login to merge, or discard this patch.