Completed
Pull Request — master (#76)
by Luke
02:26
created
src/Contracts/CollectionInterface.php 1 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/functions.php 1 patch
Unused Use Statements   +1 added lines, -10 removed lines patch added patch discarded remove patch
@@ -9,24 +9,15 @@
 block discarded – undo
9 9
  */
10 10
 namespace Noz;
11 11
 
12
-use Closure;
13 12
 use Illuminate\Support\Str;
14 13
 use InvalidArgumentException;
15 14
 use Iterator;
15
+use Noz\Contracts\CollectionInterface;
16 16
 use Noz\Immutable\Collection;
17 17
 use Noz\Immutable\Sequence;
18
-use Noz\Contracts\CollectionInterface;
19 18
 use RuntimeException;
20
-use Serializable;
21 19
 use Traversable;
22 20
 
23
-use Symfony\Component\Serializer\Serializer;
24
-use Symfony\Component\Serializer\Encoder\XmlEncoder;
25
-use Symfony\Component\Serializer\Encoder\JsonEncoder;
26
-use Symfony\Component\Serializer\Encoder\YamlEncoder;
27
-use Symfony\Component\Serializer\Encoder\CsvEncoder;
28
-use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
29
-
30 21
 /**
31 22
  * Collection factory.
32 23
  *
Please login to merge, or discard this patch.
src/Immutable/Collection.php 1 patch
Unused Use Statements   +4 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,21 +9,18 @@
 block discarded – undo
9 9
  */
10 10
 namespace Noz\Collection;
11 11
 
12
-use InvalidArgumentException;
13
-use OutOfBoundsException;
14
-
15 12
 use ArrayIterator;
16 13
 use Countable;
14
+use InvalidArgumentException;
17 15
 use Iterator;
18
-use Traversable;
19
-
20 16
 use Noz\Contracts\Arrayable;
21
-use Noz\Contracts\Invokable;
22 17
 use Noz\Contracts\CollectionInterface;
23
-
18
+use Noz\Contracts\Invokable;
24 19
 use Noz\Traits\IsArrayable;
25 20
 use Noz\Traits\IsContainer;
26 21
 use Noz\Traits\IsSerializable;
22
+use OutOfBoundsException;
23
+use Traversable;
27 24
 
28 25
 use function
29 26
     Noz\is_traversable,
Please login to merge, or discard this patch.
src/Immutable/Dict.php 1 patch
Unused Use Statements   +2 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,18 +9,11 @@
 block discarded – undo
9 9
  */
10 10
 namespace Noz\Collection;
11 11
 
12
-use BadMethodCallException;
13
-
14 12
 use Countable;
15
-use Noz\Contracts\Structure\Dictable;
16
-use Traversable;
17
-use SplFixedArray;
18
-
19
-use Noz\Contracts\Structure\Sequenceable;
20
-use Noz\Contracts\Immutable;
21 13
 use Noz\Contracts\Arrayable;
14
+use Noz\Contracts\Immutable;
22 15
 use Noz\Contracts\Invokable;
23
-
16
+use Noz\Contracts\Structure\Dictable;
24 17
 use Noz\Traits\IsImmutable;
25 18
 
26 19
 use function Noz\to_array;
Please login to merge, or discard this patch.
src/Immutable/LList.php 2 patches
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.
Unused Use Statements   +7 added lines, -10 removed lines patch added patch discarded remove patch
@@ -9,21 +9,18 @@
 block discarded – undo
9 9
  */
10 10
 namespace Noz\Immutable;
11 11
 
12
-use InvalidArgumentException;
13
-
14 12
 use Countable;
15
-use Traversable;
16
-use Serializable;
17
-use SplDoublyLinkedList;
18
-
19
-use Noz\Contracts\Structure\Listable;
20
-use Noz\Contracts\Immutable;
13
+use InvalidArgumentException;
21 14
 use Noz\Contracts\Arrayable;
15
+use Noz\Contracts\Immutable;
22 16
 use Noz\Contracts\Invokable;
23
-
17
+use Noz\Contracts\Structure\Listable;
24 18
 use Noz\Traits\IsArrayable;
25
-use Noz\Traits\IsImmutable;
26 19
 use Noz\Traits\IsContainer;
20
+use Noz\Traits\IsImmutable;
21
+use Serializable;
22
+use SplDoublyLinkedList;
23
+use Traversable;
27 24
 
28 25
 use function
29 26
     Noz\is_traversable;
Please login to merge, or discard this patch.
src/Immutable/Queue.php 1 patch
Unused Use Statements   +2 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,18 +9,11 @@
 block discarded – undo
9 9
  */
10 10
 namespace Noz\Collection;
11 11
 
12
-use BadMethodCallException;
13
-
14 12
 use Countable;
15
-use Noz\Contracts\Structure\Listable;
16
-use Traversable;
17
-use SplFixedArray;
18
-
19
-use Noz\Contracts\Structure\Sequenceable;
20
-use Noz\Contracts\Immutable;
21 13
 use Noz\Contracts\Arrayable;
14
+use Noz\Contracts\Immutable;
22 15
 use Noz\Contracts\Invokable;
23
-
16
+use Noz\Contracts\Structure\Listable;
24 17
 use Noz\Traits\IsImmutable;
25 18
 
26 19
 use function Noz\to_array;
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.
Unused Use Statements   +6 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,27 +9,22 @@
 block discarded – undo
9 9
  */
10 10
 namespace Noz\Immutable;
11 11
 
12
-use BadMethodCallException;
13
-use RuntimeException;
14
-
15
-use Iterator;
16 12
 use ArrayAccess;
13
+use BadMethodCallException;
17 14
 use Countable;
18
-use Serializable;
19
-use SplFixedArray;
20
-use Traversable;
21
-
22 15
 use Illuminate\Support\Str;
23
-
16
+use Iterator;
24 17
 use Noz\Contracts\Arrayable;
25 18
 use Noz\Contracts\Immutable;
26 19
 use Noz\Contracts\Invokable;
27 20
 use Noz\Contracts\Structure\Sequenceable;
28
-
21
+use Noz\Traits\IsArrayable;
29 22
 use Noz\Traits\IsContainer;
30 23
 use Noz\Traits\IsImmutable;
31
-use Noz\Traits\IsArrayable;
32 24
 use Noz\Traits\IsSerializable;
25
+use RuntimeException;
26
+use SplFixedArray;
27
+use Traversable;
33 28
 
34 29
 use function
35 30
     Noz\to_array,
Please login to merge, or discard this patch.
src/Immutable/Set.php 1 patch
Unused Use Statements   +2 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,17 +9,11 @@
 block discarded – undo
9 9
  */
10 10
 namespace Noz\Collection;
11 11
 
12
-use BadMethodCallException;
13
-
14 12
 use Countable;
15
-use Traversable;
16
-use SplFixedArray;
17
-
18
-use Noz\Contracts\Structure\Settable;
19
-use Noz\Contracts\Immutable;
20 13
 use Noz\Contracts\Arrayable;
14
+use Noz\Contracts\Immutable;
21 15
 use Noz\Contracts\Invokable;
22
-
16
+use Noz\Contracts\Structure\Settable;
23 17
 use Noz\Traits\IsImmutable;
24 18
 
25 19
 use function Noz\to_array;
Please login to merge, or discard this patch.
src/Immutable/Stack.php 1 patch
Unused Use Statements   +2 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,17 +9,11 @@
 block discarded – undo
9 9
  */
10 10
 namespace Noz\Collection;
11 11
 
12
-use BadMethodCallException;
13
-
14 12
 use Countable;
15
-use Traversable;
16
-use SplFixedArray;
17
-
18
-use Noz\Contracts\Structure\Listable;
19
-use Noz\Contracts\Immutable;
20 13
 use Noz\Contracts\Arrayable;
14
+use Noz\Contracts\Immutable;
21 15
 use Noz\Contracts\Invokable;
22
-
16
+use Noz\Contracts\Structure\Listable;
23 17
 use Noz\Traits\IsImmutable;
24 18
 
25 19
 use function Noz\to_array;
Please login to merge, or discard this patch.