Skip to content

Commit 323cf2f

Browse files
authored
Merge pull request #62 from simPod/collection-static
Return static on copy()
2 parents f6fd4ca + 46e74b9 commit 323cf2f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Traits/GenericCollection.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<?php
22
namespace Ds\Traits;
33

4-
use Ds\Collection;
5-
64
/**
75
* Common to structures that implement the base collection interface.
86
*/
@@ -37,9 +35,9 @@ public function jsonSerialize()
3735
/**
3836
* Creates a shallow copy of the collection.
3937
*
40-
* @return Collection a shallow copy of the collection.
38+
* @return static a shallow copy of the collection.
4139
*/
42-
public function copy(): Collection
40+
public function copy(): self
4341
{
4442
return new self($this);
4543
}

0 commit comments

Comments
 (0)