@@ -7,24 +7,24 @@  | 
                                                    ||
| 7 | 7 | class DropTest extends TestCase  | 
                                                        
| 8 | 8 |  { | 
                                                        
| 9 | 9 | |
| 10 | - public function testDropFirst()  | 
                                                        |
| 11 | -  { | 
                                                        |
| 10 | + public function testDropFirst()  | 
                                                        |
| 11 | +    { | 
                                                        |
| 12 | 12 | $array = [1, 3, 4, 5, 7];  | 
                                                        
| 13 | 13 | $result = drop(0)($array);  | 
                                                        
| 14 | 14 | $this->assertEquals([3, 4, 5, 7], $result);  | 
                                                        
| 15 | - }  | 
                                                        |
| 15 | + }  | 
                                                        |
| 16 | 16 | |
| 17 | - public function testDropLast()  | 
                                                        |
| 18 | -  { | 
                                                        |
| 17 | + public function testDropLast()  | 
                                                        |
| 18 | +    { | 
                                                        |
| 19 | 19 | $array = [1, 3, 4, 5, 7];  | 
                                                        
| 20 | 20 | $result = drop(count($array) - 1)($array);  | 
                                                        
| 21 | 21 | $this->assertEquals([1, 3, 4, 5], $result);  | 
                                                        
| 22 | - }  | 
                                                        |
| 22 | + }  | 
                                                        |
| 23 | 23 | |
| 24 | - public function testDropNth()  | 
                                                        |
| 25 | -  { | 
                                                        |
| 24 | + public function testDropNth()  | 
                                                        |
| 25 | +    { | 
                                                        |
| 26 | 26 | $array = [1, 3, 4, 5, 7];  | 
                                                        
| 27 | 27 | $result = drop(2)($array);  | 
                                                        
| 28 | 28 | $this->assertEquals([1, 3, 5, 7], $result);  | 
                                                        
| 29 | - }  | 
                                                        |
| 29 | + }  | 
                                                        |
| 30 | 30 | }  | 
                                                        
@@ -6,11 +6,11 @@  | 
                                                    ||
| 6 | 6 | |
| 7 | 7 | class FilterTest extends TestCase  | 
                                                        
| 8 | 8 |  { | 
                                                        
| 9 | - public function testFilter()  | 
                                                        |
| 10 | -  { | 
                                                        |
| 9 | + public function testFilter()  | 
                                                        |
| 10 | +    { | 
                                                        |
| 11 | 11 |      $isEven = function ($it) { | 
                                                        
| 12 | - return $it % 2 == 0;  | 
                                                        |
| 12 | + return $it % 2 == 0;  | 
                                                        |
| 13 | 13 | };  | 
                                                        
| 14 | 14 | $this->assertEquals([2,4,6], filter($isEven)([1,2,3,4,5,6]));  | 
                                                        
| 15 | - }  | 
                                                        |
| 15 | + }  | 
                                                        |
| 16 | 16 | }  | 
                                                        
@@ -8,9 +8,9 @@  | 
                                                    ||
| 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 | }  | 
                                                        
@@ -6,11 +6,11 @@  | 
                                                    ||
| 6 | 6 | |
| 7 | 7 | class ReduceTest extends TestCase  | 
                                                        
| 8 | 8 |  { | 
                                                        
| 9 | - public function testReduce()  | 
                                                        |
| 10 | -  { | 
                                                        |
| 9 | + public function testReduce()  | 
                                                        |
| 10 | +    { | 
                                                        |
| 11 | 11 |      $add = function ($a, $b) { | 
                                                        
| 12 | - return $a + $b;  | 
                                                        |
| 12 | + return $a + $b;  | 
                                                        |
| 13 | 13 | };  | 
                                                        
| 14 | 14 | $this->assertEquals(15, reduce($add)(0)([1,2,3,4,5]));  | 
                                                        
| 15 | - }  | 
                                                        |
| 15 | + }  | 
                                                        |
| 16 | 16 | }  | 
                                                        
@@ -8,9 +8,9 @@  | 
                                                    ||
| 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 | }  | 
                                                        
@@ -7,8 +7,8 @@  | 
                                                    ||
| 7 | 7 | |
| 8 | 8 | class DropLastTest extends TestCase  | 
                                                        
| 9 | 9 |  { | 
                                                        
| 10 | - public function testDropLast()  | 
                                                        |
| 11 | -  { | 
                                                        |
| 10 | + public function testDropLast()  | 
                                                        |
| 11 | +    { | 
                                                        |
| 12 | 12 | $this->assertEquals([1, 2, 3, 4], dropLast()([1, 2, 3, 4, 5]));  | 
                                                        
| 13 | - }  | 
                                                        |
| 13 | + }  | 
                                                        |
| 14 | 14 | }  | 
                                                        
@@ -6,12 +6,12 @@  | 
                                                    ||
| 6 | 6 | |
| 7 | 7 | class MapTest extends TestCase  | 
                                                        
| 8 | 8 |  { | 
                                                        
| 9 | - public function testMap()  | 
                                                        |
| 10 | -  { | 
                                                        |
| 9 | + public function testMap()  | 
                                                        |
| 10 | +    { | 
                                                        |
| 11 | 11 | $array = [1, 2, 3, 4];  | 
                                                        
| 12 | 12 |      $add10 = function ($it) { | 
                                                        
| 13 | - return $it + 10;  | 
                                                        |
| 13 | + return $it + 10;  | 
                                                        |
| 14 | 14 | };  | 
                                                        
| 15 | 15 | $this->assertEquals([11, 12, 13, 14], map($add10)($array));  | 
                                                        
| 16 | - }  | 
                                                        |
| 16 | + }  | 
                                                        |
| 17 | 17 | }  | 
                                                        
@@ -9,7 +9,7 @@  | 
                                                    ||
| 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));  | 
                                                        
@@ -7,30 +7,30 @@  | 
                                                    ||
| 7 | 7 | |
| 8 | 8 | class EqualTest extends TestCase  | 
                                                        
| 9 | 9 |  { | 
                                                        
| 10 | - public function testEqualsWithPrimitiveValueAndExpectTrue()  | 
                                                        |
| 11 | -  { | 
                                                        |
| 10 | + public function testEqualsWithPrimitiveValueAndExpectTrue()  | 
                                                        |
| 11 | +    { | 
                                                        |
| 12 | 12 | $this->assertTrue(equals(1)(1));  | 
                                                        
| 13 | 13 |      $this->assertTrue(equals('someString')('someString')); | 
                                                        
| 14 | - }  | 
                                                        |
| 15 | - public function testEqualsWithPrimitiveValueAndExpectFalse()  | 
                                                        |
| 16 | -  { | 
                                                        |
| 14 | + }  | 
                                                        |
| 15 | + public function testEqualsWithPrimitiveValueAndExpectFalse()  | 
                                                        |
| 16 | +    { | 
                                                        |
| 17 | 17 | $this->assertFalse(equals(1)(2));  | 
                                                        
| 18 | 18 |      $this->assertFalse(equals('someString')('anotherString')); | 
                                                        
| 19 | - }  | 
                                                        |
| 20 | - public function testEqualsWithObjectAndExpectTrue()  | 
                                                        |
| 21 | -  { | 
                                                        |
| 19 | + }  | 
                                                        |
| 20 | + public function testEqualsWithObjectAndExpectTrue()  | 
                                                        |
| 21 | +    { | 
                                                        |
| 22 | 22 | $obj1 = new PlainObjectAsset();  | 
                                                        
| 23 | 23 |      $obj1->setData('data'); | 
                                                        
| 24 | 24 | $obj2 = new PlainObjectAsset();  | 
                                                        
| 25 | 25 |      $obj2->setData('data'); | 
                                                        
| 26 | 26 | $this->assertTrue(equals($obj1)($obj2));  | 
                                                        
| 27 | - }  | 
                                                        |
| 28 | - public function testEqualsWithObjectAndExpectFalse()  | 
                                                        |
| 29 | -  { | 
                                                        |
| 27 | + }  | 
                                                        |
| 28 | + public function testEqualsWithObjectAndExpectFalse()  | 
                                                        |
| 29 | +    { | 
                                                        |
| 30 | 30 | $obj1 = new PlainObjectAsset();  | 
                                                        
| 31 | 31 |      $obj1->setData('data'); | 
                                                        
| 32 | 32 | $obj2 = new PlainObjectAsset();  | 
                                                        
| 33 | 33 |      $obj2->setData('anotherData'); | 
                                                        
| 34 | 34 | $this->assertFalse(equals($obj1)($obj2));  | 
                                                        
| 35 | - }  | 
                                                        |
| 35 | + }  | 
                                                        |
| 36 | 36 | }  | 
                                                        
@@ -8,9 +8,9 @@  | 
                                                    ||
| 8 | 8 | class AlwaysTest extends TestCase  | 
                                                        
| 9 | 9 |  { | 
                                                        
| 10 | 10 | |
| 11 | - public function testAlwaysMustReturnSameObject()  | 
                                                        |
| 12 | -  { | 
                                                        |
| 11 | + public function testAlwaysMustReturnSameObject()  | 
                                                        |
| 12 | +    { | 
                                                        |
| 13 | 13 | $always = always()(new PlainObjectAsset());  | 
                                                        
| 14 | 14 | $this->assertSame($always(), $always());  | 
                                                        
| 15 | - }  | 
                                                        |
| 15 | + }  | 
                                                        |
| 16 | 16 | }  | 
                                                        
@@ -6,11 +6,11 @@  | 
                                                    ||
| 6 | 6 | |
| 7 | 7 | class FilterPreserveKeyTest extends TestCase  | 
                                                        
| 8 | 8 |  { | 
                                                        
| 9 | - public function testFilter()  | 
                                                        |
| 10 | -  { | 
                                                        |
| 9 | + public function testFilter()  | 
                                                        |
| 10 | +    { | 
                                                        |
| 11 | 11 |      $isEven = function ($it) { | 
                                                        
| 12 | - return $it % 2 == 0;  | 
                                                        |
| 12 | + return $it % 2 == 0;  | 
                                                        |
| 13 | 13 | };  | 
                                                        
| 14 | 14 | $this->assertEquals([1 => 2, 3 => 4, 5 => 6], filterPreserveKey($isEven)([1,2,3,4,5,6]));  | 
                                                        
| 15 | - }  | 
                                                        |
| 15 | + }  | 
                                                        |
| 16 | 16 | }  | 
                                                        
@@ -8,9 +8,9 @@  | 
                                                    ||
| 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 | }  | 
                                                        
@@ -6,8 +6,8 @@  | 
                                                    ||
| 6 | 6 | |
| 7 | 7 | class AddTest extends TestCase  | 
                                                        
| 8 | 8 |  { | 
                                                        
| 9 | - public function testAdd()  | 
                                                        |
| 10 | -  { | 
                                                        |
| 9 | + public function testAdd()  | 
                                                        |
| 10 | +    { | 
                                                        |
| 11 | 11 | $this->assertEquals(15, add(7)(8));  | 
                                                        
| 12 | - }  | 
                                                        |
| 12 | + }  | 
                                                        |
| 13 | 13 | }  |