Completed
Pull Request — master (#76)
by Luke
02:26
created
src/Contracts/CollectionInterface.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -491,7 +491,6 @@
 block discarded – undo
491 491
      *
492 492
      * Reduces this collection to one value by passing value, key, and the return value from the previous iteration
493 493
      * until only one value remains. Iteration begins from the last item in the collection and moves up.
494
-
495 494
      * @param callable $callback The callback function
496 495
      * @param          $initial  The initial "carry" value
497 496
      *
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      * @param string|int $index Set value at this index
63 63
      * @param mixed      $value Set this value at index
64 64
      *
65
-     * @return mixed
65
+     * @return CollectionInterface
66 66
      */
67 67
     public function set($index, $value);
68 68
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      *
74 74
      * @param string|int $index Delete item at this index
75 75
      *
76
-     * @return mixed
76
+     * @return CollectionInterface
77 77
      */
78 78
     public function delete($index);
79 79
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      * @param string|int $index Add value at this index
109 109
      * @param mixed      $value Add this value at index
110 110
      *
111
-     * @return mixed
111
+     * @return CollectionInterface
112 112
      */
113 113
     public function add($index, $value);
114 114
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      * @param int  $nth    The number of items between cycles
165 165
      * @param null $offset An optional offset to begin from
166 166
      *
167
-     * @return mixed
167
+     * @return CollectionInterface
168 168
      */
169 169
     public function nth($nth, $offset = null);
170 170
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
      *
229 229
      * @param int $num Number of items to return
230 230
      *
231
-     * @return mixed|CollectionInterface
231
+     * @return CollectionInterface
232 232
      */
233 233
     public function random($num);
234 234
 
Please login to merge, or discard this patch.
src/Traits/IsArrayable.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -491,7 +491,6 @@
 block discarded – undo
491 491
      *
492 492
      * Reduces this collection to one value by passing value, key, and the return value from the previous iteration
493 493
      * until only one value remains. Iteration begins from the last item in the collection and moves up.
494
-
495 494
      * @param callable $callback The callback function
496 495
      * @param          $initial  The initial "carry" value
497 496
      *
Please login to merge, or discard this patch.
src/functions.php 1 patch
Indentation   -7 removed lines patch added patch discarded remove patch
@@ -55,10 +55,8 @@  discard block
 block discarded – undo
55 55
 
56 56
 /**
57 57
  * Underscore function.
58
-
59 58
  * This function is meant to work sort of like jQuery's "$()". It is a contextual catch-all type function. It works
60 59
  * as a short-hand alias for invoke, collect, and with.
61
-
62 60
  * @param callable|mixed    $in
63 61
  * @param mixed ...         $_
64 62
  *
@@ -136,10 +134,8 @@  discard block
 block discarded – undo
136 134
  *
137 135
  * Accepts any kind of data and converts it to an array. If strict mode is on, only data that returns true from
138 136
  * is_arrayable() will be converted to an array. Anything else will cause an InvalidArgumentException to be thrown.
139
-
140 137
  * @param mixed $data   Data to convert to array
141 138
  * @param bool  $strict Whether to use strict mode
142
-
143 139
  * @return array
144 140
  *
145 141
  * @throws InvalidArgumentException
@@ -245,12 +241,9 @@  discard block
 block discarded – undo
245 241
  * Provided with the requested offset, whether it be a string, an integer (positive or negative), or some type of
246 242
  * object, this function will normalize it to a positive integer offset or, failing that, it will throw an exception.
247 243
  * A negative offset will require either the traversable that is being indexed or its total count in order to normalize
248
-
249 244
  * @param int|mixed $offset The offset to normalize
250 245
  * @param int|array|traversable $count  Either the traversable count, or the traversable itself.
251
-
252 246
  * @return int
253
-
254 247
  * @throws RuntimeException If offset cannot be normalized
255 248
  * @throws InvalidArgumentException If offset is negative and count is not provided
256 249
  */
Please login to merge, or discard this patch.
src/Immutable/LList.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
      *
206 206
      * @param callable|null $funk The callback
207 207
      *
208
-     * @return bool
208
+     * @return boolean|null
209 209
      */
210 210
     public function every(callable $funk = null)
211 211
     {
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      *
225 225
      * @param callable|null $callback The callback
226 226
      *
227
-     * @return bool
227
+     * @return boolean|null
228 228
      */
229 229
     public function none(callable $callback = null)
230 230
     {
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 
283 283
     /**
284 284
      * @param callable|null $folder
285
-     * @param null          $initial
285
+     * @param boolean          $initial
286 286
      *
287 287
      * @return null
288 288
      */
Please login to merge, or discard this patch.
src/Immutable/Sequence.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     /**
165 165
      * Return the key of the current element.
166 166
      *
167
-     * @return mixed|null
167
+     * @return integer
168 168
      */
169 169
     public function key()
170 170
     {
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
      * Fold (reduce) sequence into a single value.
377 377
      *
378 378
      * @param callable $funk    A callback function
379
-     * @param mixed    $initial Initial value for accumulator
379
+     * @param boolean    $initial Initial value for accumulator
380 380
      *
381 381
      * @return mixed
382 382
      */
Please login to merge, or discard this patch.
Indentation   +6 added lines, -10 removed lines patch added patch discarded remove patch
@@ -83,16 +83,12 @@  discard block
 block discarded – undo
83 83
 
84 84
     /**
85 85
      * Invoke sequence.
86
-
87 86
      * A sequence is invokable as if it were a function. This allows some pretty useful functionality such as negative
88 87
      * indexing, sub-sequence selection, etc. Basically, any way you invoke a sequence, you're going to get back either
89 88
      * a single value from the sequence or a subset of it.
90
-
91 89
      * @internal param mixed $funk Either a numerical offset (positive or negative), a range string (start:end), or a
92 90
      * callback to be used as a filter.
93
-
94 91
      * @return mixed
95
-
96 92
      * @todo Put all the slice logic into a helper function or several
97 93
      */
98 94
     public function __invoke()
@@ -360,12 +356,12 @@  discard block
 block discarded – undo
360 356
      *
361 357
      * @return Sequence
362 358
      */
363
-     public function prepend($item)
364
-     {
365
-         $arr = $this->getData();
366
-         array_unshift($arr, $item);
367
-         return new static($arr);
368
-     }
359
+        public function prepend($item)
360
+        {
361
+            $arr = $this->getData();
362
+            array_unshift($arr, $item);
363
+            return new static($arr);
364
+        }
369 365
 
370 366
     /**
371 367
      * Append item to collection.
Please login to merge, or discard this patch.
src/Collection.php 1 patch
Indentation   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
             }
998 998
         });
999 999
         $args = $args->prepend($this->getData())
1000
-                     ->prepend(null);
1000
+                        ->prepend(null);
1001 1001
 
1002 1002
         return collect(
1003 1003
 //            array_map(
@@ -1185,11 +1185,9 @@  discard block
 block discarded – undo
1185 1185
 
1186 1186
     /**
1187 1187
      * Get the number of times each item occurs in the collection.
1188
-
1189 1188
      * This method will return a NumericCollection where keys are the
1190 1189
      * values and values are the number of times that value occurs in
1191 1190
      * the original collection.
1192
-
1193 1191
      * @return CollectionInterface
1194 1192
      */
1195 1193
     public function counts()
Please login to merge, or discard this patch.
src/Immutable/Collection.php 1 patch
Indentation   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
             }
998 998
         });
999 999
         $args = $args->prepend($this->getData())
1000
-                     ->prepend(null);
1000
+                        ->prepend(null);
1001 1001
 
1002 1002
         return collect(
1003 1003
 //            array_map(
@@ -1185,11 +1185,9 @@  discard block
 block discarded – undo
1185 1185
 
1186 1186
     /**
1187 1187
      * Get the number of times each item occurs in the collection.
1188
-
1189 1188
      * This method will return a NumericCollection where keys are the
1190 1189
      * values and values are the number of times that value occurs in
1191 1190
      * the original collection.
1192
-
1193 1191
      * @return CollectionInterface
1194 1192
      */
1195 1193
     public function counts()
Please login to merge, or discard this patch.