Completed
Pull Request — master (#6)
by
unknown
03:41 queued 01:28
created
build.php 2 patches
Doc Comments   -3 removed lines patch added patch discarded remove patch
@@ -634,8 +634,6 @@  discard block
 block discarded – undo
634 634
  * Gets an element of the stream methods list.
635 635
  *
636 636
  * @signature String -> Block -> String
637
- * @param  string $moduleName
638
- * @param  object $block
639 637
  * @return string
640 638
  */
641 639
 function stream_method_link() {
@@ -661,7 +659,6 @@  discard block
 block discarded – undo
661 659
  * Dump a variable and returns it.
662 660
  *
663 661
  * @signature a -> a
664
- * @param  mixed $something
665 662
  * @return mixed
666 663
  */
667 664
 function log() {
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
  * @return array
117 117
  */
118 118
 function get_modules() {
119
-    $composer = json_decode(file_get_contents(__DIR__.'/composer.json'));
119
+    $composer = json_decode(file_get_contents(__DIR__ . '/composer.json'));
120 120
     return $composer->autoload->files;
121 121
 }
122 122
 
@@ -147,10 +147,10 @@  discard block
 block discarded – undo
147 147
  */
148 148
 function write_module($module) {
149 149
     if ($module->docs) {
150
-        $docsDir  = dirname($module->docsPath);
150
+        $docsDir = dirname($module->docsPath);
151 151
         if (!is_dir($docsDir))
152 152
             mkdir($docsDir, 0777, true);
153
-        file_put_contents($module->docsPath,  $module->docs);
153
+        file_put_contents($module->docsPath, $module->docs);
154 154
     }
155 155
     if ($module->tests) {
156 156
         $testsDir = dirname($module->testsPath);
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         'fill_docs_path',
180 180
         'fill_tests_path',
181 181
         'fill_blocks'
182
-    ]), [(object)['path' => $path]]);
182
+    ]), [(object) ['path' => $path]]);
183 183
 }
184 184
 
185 185
 /**
@@ -233,8 +233,8 @@  discard block
 block discarded – undo
233 233
 function fill_blocks($module) {
234 234
     $module->blocks = apply(pipe(
235 235
         prepend('dox -r < '), // "dox -r < src/...php"
236
-        'shell_exec',         // "[{...}, ...]"
237
-        'json_decode',        // [DoxBlock]
236
+        'shell_exec', // "[{...}, ...]"
237
+        'json_decode', // [DoxBlock]
238 238
         map(_f('make_block'))
239 239
         // sort()
240 240
     ), [$module->path]);
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
     if (has('class', $tags)) $type = 'class';
257 257
     if (has('method', $tags)) $type = 'method';
258 258
 
259
-    $params = map(function($tag){
259
+    $params = map(function($tag) {
260 260
         $parts = split(' ', get('value', $tag));
261 261
         return [
262 262
             'type' => $parts[0],
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
  */
293 293
 function tags_of($doxBlock) {
294 294
     if ($doxBlock->tags)
295
-        return map(function($tag){
295
+        return map(function($tag) {
296 296
             return (object) [
297 297
                 'name'  => $tag->type,
298 298
                 'value' => $tag->string
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
  * @return object
342 342
  */
343 343
 function generate_docs_sommaire($module) {
344
-    $blocks = filter (
344
+    $blocks = filter(
345 345
         satisfiesAll(['ignore' => not(), 'internal' => not(), 'type' => equals('function')]),
346 346
         $module->blocks
347 347
     );
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
  * @return object
372 372
  */
373 373
 function generate_docs_contents($module) {
374
-    $blocks = filter (
374
+    $blocks = filter(
375 375
         satisfiesAll(['ignore' => not(), 'internal' => not()]),
376 376
         $module->blocks
377 377
     );
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
     $additionalNamespace = replace("/", "\\", remove(6, dirname($module->testsPath)));
430 430
     if ($additionalNamespace)
431 431
         $namespace .= "\\" . $additionalNamespace;
432
-    $name = remove(-4, last(split("/", $module->testsPath)));
432
+    $name = remove(- 4, last(split("/", $module->testsPath)));
433 433
     $module->tests .= "<?php namespace {$namespace};\n\nuse Tarsana\Functional as F;\n\nclass {$name} extends \Tarsana\UnitTests\Functional\UnitTest {\n";
434 434
     return $module;
435 435
 }
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
  * @return object
443 443
  */
444 444
 function generate_tests_contents($module) {
445
-    $blocks = filter (
445
+    $blocks = filter(
446 446
         satisfiesAll(['ignore' => not()]),
447 447
         $module->blocks
448 448
     );
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
     if (!contains('```php', $description))
500 500
         return '';
501 501
     $code = remove(7 + indexOf('```php', $description), $description);
502
-    return remove(-4, trim($code));
502
+    return remove(- 4, trim($code));
503 503
 }
504 504
 
505 505
 /**
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
  * @return array
553 553
  */
554 554
 function generate_stream_operations($module) {
555
-    $blocks = filter (
555
+    $blocks = filter(
556 556
         satisfiesAll(['ignore' => equals(false), 'stream' => equals(true)]),
557 557
         $module->blocks
558 558
     );
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
  * @return array
622 622
  */
623 623
 function generate_stream_methods($module) {
624
-    $blocks = filter (
624
+    $blocks = filter(
625 625
         satisfiesAll(['ignore' => equals(false), 'stream' => equals(true)]),
626 626
         $module->blocks
627 627
     );
Please login to merge, or discard this patch.
src/Classes/Stream.php 2 patches
Doc Comments   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * Creates a new Stream.
37 37
      *
38 38
      * @param  mixed $data
39
-     * @return Tarsana\Functional\Stream
39
+     * @return Stream
40 40
      */
41 41
     public static function of($data)
42 42
     {
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * Adds a new operation to the Stream class.
48 48
      *
49 49
      * @param  string $name
50
-     * @param  string $signature
50
+     * @param  string $signatures
51 51
      * @param  callable $fn
52 52
      * @return void
53 53
      */
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * Checks if the Stream class has an operation with the given name.
66 66
      *
67 67
      * @param  string  $name
68
-     * @return boolean
68
+     * @return \PHPUnit_Framework_Constraint_TraversableContains
69 69
      */
70 70
     public static function hasOperation($name)
71 71
     {
@@ -87,7 +87,6 @@  discard block
 block discarded – undo
87 87
     /**
88 88
      * Creates a new Stream with some data.
89 89
      *
90
-     * @param mixed $data
91 90
      */
92 91
     protected function __construct($stream)
93 92
     {
@@ -120,7 +119,7 @@  discard block
 block discarded – undo
120 119
      *
121 120
      * @param  string $name The name of the operation
122 121
      * @param  array  $args
123
-     * @return Tarsana\Functional\Stream
122
+     * @return Stream
124 123
      */
125 124
     public function __call($name, $args)
126 125
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
      */
54 54
     public static function operation($name, $signatures, $fn = null)
55 55
     {
56
-        if (! is_array($signatures)) {
56
+        if (!is_array($signatures)) {
57 57
             $signatures = [$signatures];
58 58
         }
59 59
         foreach ($signatures as $signature) {
Please login to merge, or discard this patch.
src/common.php 2 patches
Doc Comments   -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,6 @@  discard block
 block discarded – undo
26 26
  * ```
27 27
  *
28 28
  * @signature * -> String
29
- * @param  mixed $data
30 29
  * @return string
31 30
  */
32 31
 function type() {
@@ -73,8 +72,6 @@  discard block
 block discarded – undo
73 72
  *
74 73
  * @stream
75 74
  * @signature String -> * -> Boolean
76
- * @param  string $type
77
- * @param  mixed $data
78 75
  * @return boolean
79 76
  */
80 77
 function is() {
@@ -109,7 +106,6 @@  discard block
 block discarded – undo
109 106
  *
110 107
  * @stream
111 108
  * @signature * -> String
112
- * @param  mixed $something
113 109
  * @return string
114 110
  */
115 111
 function toString () {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
  * @param  mixed $something
115 115
  * @return string
116 116
  */
117
-function toString () {
117
+function toString() {
118 118
     static $toString = false;
119 119
     $toString = $toString ?: curry(function($something) {
120 120
         switch (type($something)) {
@@ -137,11 +137,11 @@  discard block
 block discarded – undo
137 137
                 return $something->__toString();
138 138
             case 'Object':
139 139
             case 'Array':
140
-                return '{' . join(', ', map(function($pair){
141
-                    return $pair[0].': '. toString($pair[1]);
140
+                return '{' . join(', ', map(function($pair) {
141
+                    return $pair[0] . ': ' . toString($pair[1]);
142 142
                 }, toPairs($something))) . '}';
143 143
             default:
144
-                return '['.type($something).']';
144
+                return '[' . type($something) . ']';
145 145
         }
146 146
     });
147 147
     return _apply($toString, func_get_args());
Please login to merge, or discard this patch.
src/Internal/_stream.php 2 patches
Doc Comments   +1 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
  * Returns supported types in signatures.
41 41
  *
42 42
  * @signature List
43
- * @return array
43
+ * @return string[]
44 44
  */
45 45
 function _stream_types() {
46 46
     return [
@@ -126,7 +126,6 @@  discard block
 block discarded – undo
126 126
  * @signature String -> String -> Maybe(Function) -> Operation
127 127
  * @param  string $name
128 128
  * @param  string $signature
129
- * @param  callable $fn
130 129
  * @return array
131 130
  */
132 131
 function _stream_operation($name, $signature, $callable = null) {
@@ -190,8 +189,6 @@  discard block
 block discarded – undo
190 189
  * F\_stream_ensure_type('List -> Bar', 'Bar'); // throws "Stream: invalid signature 'List -> Bar' it should follow the syntax 'TypeArg1 -> TypeArg2 -> ... -> ReturnType' and types to use are Boolean, Number, String, Resource, Function, List, Array, Object, Any"
191 190
  * ```
192 191
  * @signature String -> String -> String
193
- * @param  string $signature
194
- * @param  string $type
195 192
  * @return string
196 193
  */
197 194
 function _stream_ensure_type() {
@@ -491,8 +488,6 @@  discard block
 block discarded – undo
491 488
  * ```
492 489
  *
493 490
  * @signature [String] -> Operation -> Boolean
494
- * @param  array $argsTypes
495
- * @param  array $operation
496 491
  * @return bool
497 492
  */
498 493
 function _stream_operation_is_applicable() {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     if (length($parts) < 2)
168 168
         _stream_throw_error('invalid-signature', $text);
169 169
 
170
-    return reduce(function($result, $part){
170
+    return reduce(function($result, $part) {
171 171
         return chain(function($item) use($result){
172 172
             return map(append($item), $result);
173 173
         }, $part);
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
  */
198 198
 function _stream_ensure_type() {
199 199
     $ensureType = function($signature, $type) {
200
-        if (! contains($type, _stream_types()))
200
+        if (!contains($type, _stream_types()))
201 201
             _stream_throw_error('invalid-signature', $signature);
202 202
         return $type;
203 203
     };
Please login to merge, or discard this patch.
src/math.php 2 patches
Doc Comments   -23 removed lines patch added patch discarded remove patch
@@ -14,8 +14,6 @@  discard block
 block discarded – undo
14 14
  *
15 15
  * @stream
16 16
  * @signature Number -> Number -> Number
17
- * @param  int|float $x
18
- * @param  int|float $y
19 17
  * @return int|float
20 18
  */
21 19
 function plus() {
@@ -35,8 +33,6 @@  discard block
 block discarded – undo
35 33
  *
36 34
  * @stream
37 35
  * @signature Number -> Number -> Number
38
- * @param  int|float $x
39
- * @param  int|float $y
40 36
  * @return int|float
41 37
  */
42 38
 function minus() {
@@ -57,7 +53,6 @@  discard block
 block discarded – undo
57 53
  *
58 54
  * @stream
59 55
  * @signature Number -> Number
60
- * @param  int|float $x
61 56
  * @return int|float
62 57
  */
63 58
 function negate() {
@@ -78,8 +73,6 @@  discard block
 block discarded – undo
78 73
  *
79 74
  * @stream
80 75
  * @signature Number -> Number -> Number
81
- * @param  int|float $x
82
- * @param  int|float $y
83 76
  * @return int|float
84 77
  */
85 78
 function multiply() {
@@ -99,8 +92,6 @@  discard block
 block discarded – undo
99 92
  *
100 93
  * @stream
101 94
  * @signature Number -> Number -> Number
102
- * @param  int|float $x
103
- * @param  int|float $y
104 95
  * @return int|float
105 96
  */
106 97
 function divide() {
@@ -120,8 +111,6 @@  discard block
 block discarded – undo
120 111
  *
121 112
  * @stream
122 113
  * @signature Number -> Number -> Number
123
- * @param  int|float $x
124
- * @param  int|float $y
125 114
  * @return int|float
126 115
  */
127 116
 function modulo() {
@@ -142,7 +131,6 @@  discard block
 block discarded – undo
142 131
  *
143 132
  * @stream
144 133
  * @signature [Number] -> Number
145
- * @param  array $numbers
146 134
  * @return int|float
147 135
  */
148 136
 function sum() {
@@ -163,7 +151,6 @@  discard block
 block discarded – undo
163 151
  *
164 152
  * @stream
165 153
  * @signature [Number] -> Number
166
- * @param  array $numbers
167 154
  * @return int|float
168 155
  */
169 156
 function product() {
@@ -184,8 +171,6 @@  discard block
 block discarded – undo
184 171
  *
185 172
  * @stream
186 173
  * @signature Number -> Number -> Number
187
- * @param  number $a
188
- * @param  number $b
189 174
  * @return number
190 175
  */
191 176
 function min() {
@@ -206,9 +191,6 @@  discard block
 block discarded – undo
206 191
  *
207 192
  * @stream
208 193
  * @signature (a -> Number) -> a -> a -> a
209
- * @param  callable $fn
210
- * @param  mixed $a
211
- * @param  mixed $b
212 194
  * @return mixed
213 195
  */
214 196
 function minBy() {
@@ -229,8 +211,6 @@  discard block
 block discarded – undo
229 211
  *
230 212
  * @stream
231 213
  * @signature Number -> Number -> Number
232
- * @param  number $a
233
- * @param  number $b
234 214
  * @return number
235 215
  */
236 216
 function max() {
@@ -251,9 +231,6 @@  discard block
 block discarded – undo
251 231
  *
252 232
  * @stream
253 233
  * @signature (a -> Number) -> a -> a -> a
254
- * @param  callable $fn
255
- * @param  mixed $a
256
- * @param  mixed $b
257 234
  * @return mixed
258 235
  */
259 236
 function maxBy() {
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  */
21 21
 function plus() {
22 22
     static $plus = false;
23
-    $plus = $plus ?: curry(function($x, $y){
23
+    $plus = $plus ?: curry(function($x, $y) {
24 24
         return $x + $y;
25 25
     });
26 26
     return _apply($plus, func_get_args());
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
  */
42 42
 function minus() {
43 43
     static $minus = false;
44
-    $minus = $minus ?: curry(function($x, $y){
44
+    $minus = $minus ?: curry(function($x, $y) {
45 45
         return $x - $y;
46 46
     });
47 47
     return _apply($minus, func_get_args());
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
  */
63 63
 function negate() {
64 64
     static $negate = false;
65
-    $negate = $negate ?: curry(function($x){
66
-        return -$x;
65
+    $negate = $negate ?: curry(function($x) {
66
+        return - $x;
67 67
     });
68 68
     return _apply($negate, func_get_args());
69 69
 }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
  */
85 85
 function multiply() {
86 86
     static $multiply = false;
87
-    $multiply = $multiply ?: curry(function($x, $y){
87
+    $multiply = $multiply ?: curry(function($x, $y) {
88 88
         return $y * $x;
89 89
     });
90 90
     return _apply($multiply, func_get_args());
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
  */
106 106
 function divide() {
107 107
     static $divide = false;
108
-    $divide = $divide ?: curry(function($x, $y){
108
+    $divide = $divide ?: curry(function($x, $y) {
109 109
         return $x / $y;
110 110
     });
111 111
     return _apply($divide, func_get_args());
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
  */
127 127
 function modulo() {
128 128
     static $modulo = false;
129
-    $modulo = $modulo ?: curry(function($x, $y){
129
+    $modulo = $modulo ?: curry(function($x, $y) {
130 130
         return $x % $y;
131 131
     });
132 132
     return _apply($modulo, func_get_args());
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
  */
187 187
 function min() {
188 188
     static $min = false;
189
-    $min = $min ?: curry(function($a, $b){
189
+    $min = $min ?: curry(function($a, $b) {
190 190
         return $a < $b ? $a : $b;
191 191
     });
192 192
     return _apply($min, func_get_args());
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
  */
210 210
 function minBy() {
211 211
     static $minBy = false;
212
-    $minBy = $minBy ?: curry(function($fn, $a, $b){
212
+    $minBy = $minBy ?: curry(function($fn, $a, $b) {
213 213
         return $fn($a) < $fn($b) ? $a : $b;
214 214
     });
215 215
     return _apply($minBy, func_get_args());
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
  */
232 232
 function max() {
233 233
     static $max = false;
234
-    $max = $max ?: curry(function($a, $b){
234
+    $max = $max ?: curry(function($a, $b) {
235 235
         return $a > $b ? $a : $b;
236 236
     });
237 237
     return _apply($max, func_get_args());
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
  */
255 255
 function maxBy() {
256 256
     static $maxBy = false;
257
-    $maxBy = $maxBy ?: curry(function($fn, $a, $b){
257
+    $maxBy = $maxBy ?: curry(function($fn, $a, $b) {
258 258
         return $fn($a) > $fn($b) ? $a : $b;
259 259
     });
260 260
     return _apply($maxBy, func_get_args());
Please login to merge, or discard this patch.
src/string.php 2 patches
Doc Comments   -28 removed lines patch added patch discarded remove patch
@@ -14,8 +14,6 @@  discard block
 block discarded – undo
14 14
  *
15 15
  * @stream
16 16
  * @signature String -> String -> [String]
17
- * @param string $delimiter
18
- * @param string $string
19 17
  * @return array
20 18
  */
21 19
 function split() {
@@ -34,8 +32,6 @@  discard block
 block discarded – undo
34 32
  *
35 33
  * @stream
36 34
  * @signature String -> [String] -> String
37
- * @param string $glue
38
- * @param array $pieces
39 35
  * @return string
40 36
  */
41 37
 function join() {
@@ -59,9 +55,6 @@  discard block
 block discarded – undo
59 55
  *
60 56
  * @stream
61 57
  * @signature String|[String] -> String|[String] -> String -> String
62
- * @param  string $search
63
- * @param  string $replacement
64
- * @param  string $string
65 58
  * @return string
66 59
  */
67 60
 function replace() {
@@ -81,9 +74,6 @@  discard block
 block discarded – undo
81 74
  *
82 75
  * @stream
83 76
  * @signature String -> String -> String -> String
84
- * @param  string $pattern
85
- * @param  string $replacement
86
- * @param  string $string
87 77
  * @return string
88 78
  */
89 79
 function regReplace() {
@@ -101,7 +91,6 @@  discard block
 block discarded – undo
101 91
  *
102 92
  * @stream
103 93
  * @signature String -> String
104
- * @param  string $string
105 94
  * @return string
106 95
  */
107 96
 function upperCase() {
@@ -119,7 +108,6 @@  discard block
 block discarded – undo
119 108
  *
120 109
  * @stream
121 110
  * @signature String -> String
122
- * @param  string $string
123 111
  * @return string
124 112
  */
125 113
 function lowerCase() {
@@ -137,7 +125,6 @@  discard block
 block discarded – undo
137 125
  *
138 126
  * @stream
139 127
  * @signature String -> String
140
- * @param  string $string
141 128
  * @return string
142 129
  */
143 130
 function camelCase() {
@@ -164,8 +151,6 @@  discard block
 block discarded – undo
164 151
  *
165 152
  * @stream
166 153
  * @signature String -> String -> String
167
- * @param  string $delimiter
168
- * @param  string $string
169 154
  * @return string
170 155
  */
171 156
 function snakeCase() {
@@ -194,8 +179,6 @@  discard block
 block discarded – undo
194 179
  *
195 180
  * @stream
196 181
  * @signature String -> String -> Boolean
197
- * @param  string $token
198
- * @param  string $string
199 182
  * @return bool
200 183
  */
201 184
 function startsWith() {
@@ -220,8 +203,6 @@  discard block
 block discarded – undo
220 203
  *
221 204
  * @stream
222 205
  * @signature String -> String -> Boolean
223
- * @param  string $token
224
- * @param  string $string
225 206
  * @return bool
226 207
  */
227 208
 function endsWith() {
@@ -246,8 +227,6 @@  discard block
 block discarded – undo
246 227
  *
247 228
  * @stream
248 229
  * @signature String -> String -> Boolean
249
- * @param  string $pattern
250
- * @param  string $string
251 230
  * @return bool
252 231
  */
253 232
 function test() {
@@ -270,8 +249,6 @@  discard block
 block discarded – undo
270 249
  *
271 250
  * @stream
272 251
  * @signature String -> String -> [String]
273
- * @param  string $pattern
274
- * @param  string $string
275 252
  * @return array
276 253
  */
277 254
 function match() {
@@ -295,8 +272,6 @@  discard block
 block discarded – undo
295 272
  *
296 273
  * @stream
297 274
  * @signature String -> String -> Number
298
- * @param  string $token
299
- * @param  string $text
300 275
  * @return int
301 276
  */
302 277
 function occurences() {
@@ -322,9 +297,6 @@  discard block
 block discarded – undo
322 297
  *
323 298
  * @stream
324 299
  * @signature String -> String -> String -> [String]
325
- * @param  string $surrounders
326
- * @param  string $separator
327
- * @param  sring $text
328 300
  * @return array
329 301
  */
330 302
 function chunks() {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
  */
47 47
 function join() {
48 48
     static $join = false;
49
-    $join = $join ?: curry(function($glue, $pieces){
49
+    $join = $join ?: curry(function($glue, $pieces) {
50 50
         return implode($glue, $pieces);
51 51
     });
52 52
     return _apply($join, func_get_args());
Please login to merge, or discard this patch.
src/Classes/Error.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      * @param  Error|null $error
19 19
      * @return Error
20 20
      */
21
-    public static function of ($message, $code = 0, Error $error = null)
21
+    public static function of($message, $code = 0, Error $error = null)
22 22
     {
23 23
         return new Error($message, $code, $error);
24 24
     }
Please login to merge, or discard this patch.
performance/run.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 /**
4 4
  * Returns the list of scripts to compare.
5 5
  *
6
- * @return array
6
+ * @return string[]
7 7
  */
8 8
 function scripts() {
9 9
     return [
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
  * and returns its running time in miliseconds.
102 102
  *
103 103
  * @param  string $path
104
- * @return array
104
+ * @return double
105 105
  */
106 106
 function execute($path, $input) {
107 107
     $start = microtime(true);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,8 @@
 block discarded – undo
79 79
  */
80 80
 function averageTime($n, $path, $test) {
81 81
     $s = 0;
82
-    for ($i=0; $i < $n; $i++) {
83
-        $s =+ execute($path, $test->input);
82
+    for ($i = 0; $i < $n; $i ++) {
83
+        $s = + execute($path, $test->input);
84 84
     }
85 85
     return $s / $n;
86 86
 }
Please login to merge, or discard this patch.
src/object.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
  */
174 174
 function has() {
175 175
     static $has = false;
176
-    $has = $has ?: curry(function($name, $object){
176
+    $has = $has ?: curry(function($name, $object) {
177 177
         if (is_object($object)) return isset($object->{$name});
178 178
         if (is_array($object)) return isset($object[$name]);
179 179
         return false;
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
  */
209 209
 function get() {
210 210
     static $get = false;
211
-    $get = $get ?: curry(function($name, $object){
211
+    $get = $get ?: curry(function($name, $object) {
212 212
         return is_object($object)
213 213
             ? (isset($object->{$name}) ? $object->{$name} : null)
214 214
             : (isset($object[$name]) ? $object[$name] : null);
Please login to merge, or discard this patch.
Doc Comments   -24 removed lines patch added patch discarded remove patch
@@ -22,7 +22,6 @@  discard block
 block discarded – undo
22 22
  * ```
23 23
  *
24 24
  * @signature a -> a
25
- * @param  mixed $value
26 25
  * @return mixed
27 26
  */
28 27
 function clone_() {
@@ -74,7 +73,6 @@  discard block
 block discarded – undo
74 73
  *
75 74
  * @stream
76 75
  * @signature {k: v} -> {k: v}
77
- * @param  object|array $object
78 76
  * @return array
79 77
  */
80 78
 function attributes() {
@@ -99,7 +97,6 @@  discard block
 block discarded – undo
99 97
  * @stream
100 98
  * @signature [*] -> [Number]
101 99
  * @signature {k: v} -> [k]
102
- * @param object|array $object
103 100
  * @return array
104 101
  */
105 102
 function keys() {
@@ -124,7 +121,6 @@  discard block
 block discarded – undo
124 121
  * @stream
125 122
  * @signature [a] -> [a]
126 123
  * @signature {k: v} -> [v]
127
- * @param object|array $object
128 124
  * @return array
129 125
  */
130 126
 function values() {
@@ -167,8 +163,6 @@  discard block
 block discarded – undo
167 163
  *
168 164
  * @stream
169 165
  * @signature k -> {k: v} -> Boolean
170
- * @param  string|int $name
171
- * @param  mixed $object
172 166
  * @return bool
173 167
  */
174 168
 function has() {
@@ -202,8 +196,6 @@  discard block
 block discarded – undo
202 196
  *
203 197
  * @stream
204 198
  * @signature k -> {k: v} -> Maybe(v)
205
- * @param  string $name
206
- * @param  array $object
207 199
  * @return mixed
208 200
  */
209 201
 function get() {
@@ -233,8 +225,6 @@  discard block
 block discarded – undo
233 225
  *
234 226
  * @stream
235 227
  * @signature [k] -> {k: v} -> v
236
- * @param  array $path
237
- * @param  mixed $object
238 228
  * @return mixed
239 229
  */
240 230
 function getPath() {
@@ -265,9 +255,6 @@  discard block
 block discarded – undo
265 255
  *
266 256
  * @stream
267 257
  * @signature k -> v -> {k: v} -> {k: v}
268
- * @param  string|int $name
269
- * @param  mixed $value
270
- * @param  mixed $object
271 258
  * @return mixed
272 259
  */
273 260
 function set() {
@@ -299,9 +286,6 @@  discard block
 block discarded – undo
299 286
  *
300 287
  * @stream
301 288
  * @signature k -> (v -> v) -> {k: v} -> {k: v}
302
- * @param  string|int $name
303
- * @param  callable $fn
304
- * @param  mixed $object
305 289
  * @return mixed
306 290
  */
307 291
 function update() {
@@ -327,9 +311,6 @@  discard block
 block discarded – undo
327 311
  *
328 312
  * @stream
329 313
  * @signature (a -> Boolean) -> k -> {k : a} -> Boolean
330
- * @param  callable $predicate
331
- * @param  string|int $key
332
- * @param  mixed $object
333 314
  * @return bool
334 315
  */
335 316
 function satisfies() {
@@ -362,8 +343,6 @@  discard block
 block discarded – undo
362 343
  *
363 344
  * @stream
364 345
  * @signature {String: (a -> Boolean)} -> {k : a} -> Boolean
365
- * @param  array $predicates
366
- * @param  mixed $object
367 346
  * @return bool
368 347
  */
369 348
 function satisfiesAll() {
@@ -400,8 +379,6 @@  discard block
 block discarded – undo
400 379
  *
401 380
  * @stream
402 381
  * @signature {String: (a -> Boolean)} -> {k : a} -> Boolean
403
- * @param  array $predicates
404
- * @param  mixed $object
405 382
  * @return bool
406 383
  */
407 384
 function satisfiesAny() {
@@ -427,7 +404,6 @@  discard block
 block discarded – undo
427 404
  * @stream
428 405
  * @signature {k: v} -> [(k,v)]
429 406
  * @signature [v] -> [(Number,v)]
430
- * @param  array $object
431 407
  * @return array
432 408
  */
433 409
 function toPairs() {
Please login to merge, or discard this patch.