Completed
Pull Request — master (#12)
by Siwapun
01:40
created
test/AppendTest.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
 
7 7
 class AppendTest extends TestCase
8 8
 {
9
-  public function testAppend()
10
-  {
9
+    public function testAppend()
10
+    {
11 11
     $result = append(3)([1, 2]);
12 12
     $this->assertEquals([1, 2, 3], $result);
13
-  }
13
+    }
14 14
 
15
-  public function testAppendWithoutAutoCurry()
16
-  {
15
+    public function testAppendWithoutAutoCurry()
16
+    {
17 17
     $result = append(3, [1, 2]);
18 18
     $this->assertEquals([1, 2, 3], $result);
19
-  }
19
+    }
20 20
 }
Please login to merge, or discard this patch.
test/SubtractTest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@
 block discarded – undo
6 6
 
7 7
 class SubtractTest extends TestCase
8 8
 {
9
-  public function testDivide()
10
-  {
9
+    public function testDivide()
10
+    {
11 11
     $firstValue = 50;
12 12
     $secondValue = 10;
13 13
     $expectedResult = 40;
14 14
     $actualResult = subtract($firstValue)($secondValue);
15 15
     $this->assertEquals($expectedResult, $actualResult);
16
-  }
16
+    }
17 17
 }
Please login to merge, or discard this patch.
test/PrependTest.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
 
7 7
 class PrependTest extends TestCase
8 8
 {
9
-  public function testAppend()
10
-  {
9
+    public function testAppend()
10
+    {
11 11
     $result = prepend(1)([2, 3]);
12 12
     $this->assertEquals([1, 2, 3], $result);
13
-  }
13
+    }
14 14
 
15
-  public function testAppendWithoutAutoCurry()
16
-  {
15
+    public function testAppendWithoutAutoCurry()
16
+    {
17 17
     $result = prepend(1, [2, 3]);
18 18
     $this->assertEquals([1, 2, 3], $result);
19
-  }
19
+    }
20 20
 }
Please login to merge, or discard this patch.
src/math.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@  discard block
 block discarded – undo
9 9
  */
10 10
 function add()
11 11
 {
12
-  $add = function ($firstValue, $secondValue) {
12
+    $add = function ($firstValue, $secondValue) {
13 13
     return $firstValue + $secondValue;
14
-  };
15
-  $arguments = func_get_args();
16
-  $curried = curryN($add, 2);
17
-  return call_user_func_array($curried, $arguments);
14
+    };
15
+    $arguments = func_get_args();
16
+    $curried = curryN($add, 2);
17
+    return call_user_func_array($curried, $arguments);
18 18
 }
19 19
 
20 20
 /**
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
  */
26 26
 function divide()
27 27
 {
28
-  $divide = function ($firstValue, $secondValue) {
28
+    $divide = function ($firstValue, $secondValue) {
29 29
     return $firstValue / $secondValue;
30
-  };
31
-  $arguments = func_get_args();
32
-  $curried = curryN($divide, 2);
33
-  return call_user_func_array($curried, $arguments);
30
+    };
31
+    $arguments = func_get_args();
32
+    $curried = curryN($divide, 2);
33
+    return call_user_func_array($curried, $arguments);
34 34
 }
35 35
 
36 36
 /**
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
  */
42 42
 function multiply()
43 43
 {
44
-  $multiply = function ($firstValue, $secondValue) {
44
+    $multiply = function ($firstValue, $secondValue) {
45 45
     return $firstValue * $secondValue;
46
-  };
47
-  $arguments = func_get_args();
48
-  $curried = curryN($multiply, 2);
49
-  return call_user_func_array($curried, $arguments);
46
+    };
47
+    $arguments = func_get_args();
48
+    $curried = curryN($multiply, 2);
49
+    return call_user_func_array($curried, $arguments);
50 50
 }
51 51
 
52 52
 /**
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
  */
58 58
 function subtract()
59 59
 {
60
-  $subtract = function ($firstValue, $secondValue) {
60
+    $subtract = function ($firstValue, $secondValue) {
61 61
     return $firstValue - $secondValue;
62
-  };
63
-  $arguments = func_get_args();
64
-  $curried = curryN($subtract, 2);
65
-  return call_user_func_array($curried, $arguments);
62
+    };
63
+    $arguments = func_get_args();
64
+    $curried = curryN($subtract, 2);
65
+    return call_user_func_array($curried, $arguments);
66 66
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  */
10 10
 function add()
11 11
 {
12
-  $add = function ($firstValue, $secondValue) {
12
+  $add = function($firstValue, $secondValue) {
13 13
     return $firstValue + $secondValue;
14 14
   };
15 15
   $arguments = func_get_args();
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  */
26 26
 function divide()
27 27
 {
28
-  $divide = function ($firstValue, $secondValue) {
28
+  $divide = function($firstValue, $secondValue) {
29 29
     return $firstValue / $secondValue;
30 30
   };
31 31
   $arguments = func_get_args();
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
  */
42 42
 function multiply()
43 43
 {
44
-  $multiply = function ($firstValue, $secondValue) {
44
+  $multiply = function($firstValue, $secondValue) {
45 45
     return $firstValue * $secondValue;
46 46
   };
47 47
   $arguments = func_get_args();
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
  */
58 58
 function subtract()
59 59
 {
60
-  $subtract = function ($firstValue, $secondValue) {
60
+  $subtract = function($firstValue, $secondValue) {
61 61
     return $firstValue - $secondValue;
62 62
   };
63 63
   $arguments = func_get_args();
Please login to merge, or discard this patch.
test/PartialTest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@
 block discarded – undo
7 7
 
8 8
 class PartialTest extends TestCase
9 9
 {
10
-  public function testPartial()
11
-  {
10
+    public function testPartial()
11
+    {
12 12
     $double = partial(multiply(), [2]);
13 13
     $arg = 10;
14 14
     $expectedResult = 20;
15 15
     $actualResult = $double($arg);
16 16
     $this->assertEquals($expectedResult, $actualResult);
17
-  }
17
+    }
18 18
 }
Please login to merge, or discard this patch.
test/PartialRightTest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@
 block discarded – undo
7 7
 
8 8
 class PartialRightTest extends TestCase
9 9
 {
10
-  public function testPartial()
11
-  {
10
+    public function testPartial()
11
+    {
12 12
     $double = partialRight(divide(), [2]);
13 13
     $arg = 10;
14 14
     $expectedResult = 5;
15 15
     $actualResult = $double($arg);
16 16
     $this->assertEquals($expectedResult, $actualResult);
17
-  }
17
+    }
18 18
 }
Please login to merge, or discard this patch.
test/ApplyTest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
 
8 8
 class ApplyTest extends TestCase
9 9
 {
10
-  public function testApply()
11
-  {
10
+    public function testApply()
11
+    {
12 12
     $add = add();
13 13
     $firstArg = 1;
14 14
     $secondArg = 2;
15 15
     $expectedResult = 3;
16 16
     $actualResult = apply($add)([$firstArg, $secondArg]);
17 17
     $this->assertEquals($expectedResult, $actualResult);
18
-  }
18
+    }
19 19
 }
Please login to merge, or discard this patch.
test/CallTest.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,23 +7,23 @@
 block discarded – undo
7 7
 
8 8
 class CallTest extends TestCase
9 9
 {
10
-  public function testCallWithCurrying()
11
-  {
10
+    public function testCallWithCurrying()
11
+    {
12 12
     $add = add();
13 13
     $firstArg = 1;
14 14
     $secondArg = 2;
15 15
     $expectedResult = 3;
16 16
     $actualResult = call()($add)($firstArg, $secondArg);
17 17
     $this->assertEquals($expectedResult, $actualResult);
18
-  }
18
+    }
19 19
 
20
-  public function testCallWithoutCurrying()
21
-  {
20
+    public function testCallWithoutCurrying()
21
+    {
22 22
     $add = add();
23 23
     $firstArg = 1;
24 24
     $secondArg = 2;
25 25
     $expectedResult = 3;
26 26
     $actualResult = call($add, $firstArg, $secondArg);
27 27
     $this->assertEquals($expectedResult, $actualResult);
28
-  }
28
+    }
29 29
 }
Please login to merge, or discard this patch.
test/GteTest.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,27 +6,27 @@
 block discarded – undo
6 6
 
7 7
 class GteTest extends TestCase
8 8
 {
9
-  public function testGteWithFirstArgIsLessThanSecondOne()
10
-  {
9
+    public function testGteWithFirstArgIsLessThanSecondOne()
10
+    {
11 11
     $firstArg = 1;
12 12
     $secondArg = 2;
13 13
     $actual = gte($firstArg)($secondArg);
14 14
     $this->assertFalse($actual);
15
-  }
15
+    }
16 16
 
17
-  public function testGteWithFirstArgIsEqualToSecondOne()
18
-  {
17
+    public function testGteWithFirstArgIsEqualToSecondOne()
18
+    {
19 19
     $firstArg = 2;
20 20
     $secondArg = 2;
21 21
     $actual = gte($firstArg)($secondArg);
22 22
     $this->assertTrue($actual);
23
-  }
23
+    }
24 24
 
25
-  public function testGteWithFirstArgIsGreaterThanSecondOne()
26
-  {
25
+    public function testGteWithFirstArgIsGreaterThanSecondOne()
26
+    {
27 27
     $firstArg = 3;
28 28
     $secondArg = 2;
29 29
     $actual = gte($firstArg)($secondArg);
30 30
     $this->assertTrue($actual);
31
-  }
31
+    }
32 32
 }
Please login to merge, or discard this patch.