Completed
Push — master ( 5a66ad...309b32 )
by Amine
01:58
created
src/math.php 2 patches
Doc Comments   -13 removed lines patch added patch discarded remove patch
@@ -11,8 +11,6 @@  discard block
 block discarded – undo
11 11
  * ```
12 12
  *
13 13
  * @signature Number -> Number -> Number
14
- * @param  int|float $x
15
- * @param  int|float $y
16 14
  * @return int|float
17 15
  */
18 16
 function plus() {
@@ -29,8 +27,6 @@  discard block
 block discarded – undo
29 27
  * ```
30 28
  *
31 29
  * @signature Number -> Number -> Number
32
- * @param  int|float $x
33
- * @param  int|float $y
34 30
  * @return int|float
35 31
  */
36 32
 function minus() {
@@ -48,7 +44,6 @@  discard block
 block discarded – undo
48 44
  * ```
49 45
  *
50 46
  * @signature Number -> Number
51
- * @param  int|float $x
52 47
  * @return int|float
53 48
  */
54 49
 function negate() {
@@ -65,8 +60,6 @@  discard block
 block discarded – undo
65 60
  * ```
66 61
  *
67 62
  * @signature Number -> Number -> Number
68
- * @param  int|float $x
69
- * @param  int|float $y
70 63
  * @return int|float
71 64
  */
72 65
 function multiply() {
@@ -83,8 +76,6 @@  discard block
 block discarded – undo
83 76
  * ```
84 77
  *
85 78
  * @signature Number -> Number -> Number
86
- * @param  int|float $x
87
- * @param  int|float $y
88 79
  * @return int|float
89 80
  */
90 81
 function divide() {
@@ -101,8 +92,6 @@  discard block
 block discarded – undo
101 92
  * ```
102 93
  *
103 94
  * @signature Number -> Number -> Number
104
- * @param  int|float $x
105
- * @param  int|float $y
106 95
  * @return int|float
107 96
  */
108 97
 function modulo() {
@@ -120,7 +109,6 @@  discard block
 block discarded – undo
120 109
  * ```
121 110
  *
122 111
  * @signature [Number] -> Number
123
- * @param  array $numbers
124 112
  * @return int|float
125 113
  */
126 114
 function sum() {
@@ -137,7 +125,6 @@  discard block
 block discarded – undo
137 125
  * ```
138 126
  *
139 127
  * @signature [Number] -> Number
140
- * @param  array $numbers
141 128
  * @return int|float
142 129
  */
143 130
 function product() {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * @return int|float
17 17
  */
18 18
 function plus() {
19
-    $plus = curry(function($x, $y){
19
+    $plus = curry(function($x, $y) {
20 20
         return $x + $y;
21 21
     });
22 22
     return apply($plus, func_get_args());
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
  * @return int|float
35 35
  */
36 36
 function minus() {
37
-    $minus = curry(function($x, $y){
37
+    $minus = curry(function($x, $y) {
38 38
         return $x - $y;
39 39
     });
40 40
     return apply($minus, func_get_args());
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
  * @return int|float
53 53
  */
54 54
 function negate() {
55
-    return apply(curry(function($x){
56
-        return -$x;
55
+    return apply(curry(function($x) {
56
+        return - $x;
57 57
     }), func_get_args());
58 58
 }
59 59
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
  * @return int|float
71 71
  */
72 72
 function multiply() {
73
-    $multiply = curry(function($x, $y){
73
+    $multiply = curry(function($x, $y) {
74 74
         return $y * $x;
75 75
     });
76 76
     return apply($multiply, func_get_args());
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
  * @return int|float
89 89
  */
90 90
 function divide() {
91
-    $divide = curry(function($x, $y){
91
+    $divide = curry(function($x, $y) {
92 92
         return $x / $y;
93 93
     });
94 94
     return apply($divide, func_get_args());
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
  * @return int|float
107 107
  */
108 108
 function modulo() {
109
-    $modulo = curry(function($x, $y){
109
+    $modulo = curry(function($x, $y) {
110 110
         return $x % $y;
111 111
     });
112 112
     return apply($modulo, func_get_args());
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
  * @return int|float
125 125
  */
126 126
 function sum() {
127
-    return apply(curry(function($numbers){
127
+    return apply(curry(function($numbers) {
128 128
         return reduce(plus(), 0, $numbers);
129 129
     }), func_get_args());
130 130
 }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
  * @return int|float
142 142
  */
143 143
 function product() {
144
-    return apply(curry(function($numbers){
144
+    return apply(curry(function($numbers) {
145 145
         return reduce(multiply(), 1, $numbers);
146 146
     }), func_get_args());
147 147
 }
Please login to merge, or discard this patch.