File tree Expand file tree Collapse file tree 7 files changed +8
-10
lines changed Expand file tree Collapse file tree 7 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ function count(): int;
2525 /**
2626 * Returns a shallow copy of the collection.
2727 *
28- * @return Collection a copy of the collection.
28+ * @return static a copy of the collection.
2929 */
30- function copy (): Collection ;
30+ function copy ();
3131
3232 /**
3333 * Returns whether the collection is empty.
Original file line number Diff line number Diff line change @@ -52,10 +52,8 @@ public function __unset($name)
5252
5353 /**
5454 * Returns a copy of the Pair
55- *
56- * @return Pair
5755 */
58- public function copy (): Pair
56+ public function copy (): self
5957 {
6058 return new self ($ this ->key , $ this ->value );
6159 }
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public function clear()
5050 /**
5151 * @inheritDoc
5252 */
53- public function copy (): \ Ds \ Collection
53+ public function copy (): self
5454 {
5555 $ copy = new PriorityQueue ();
5656
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public function clear()
6363 /**
6464 * @inheritDoc
6565 */
66- public function copy (): \ Ds \ Collection
66+ public function copy (): self
6767 {
6868 return new self ($ this ->deque );
6969 }
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ public function contains(...$values): bool
101101 /**
102102 * @inheritDoc
103103 */
104- public function copy (): \ Ds \ Collection
104+ public function copy (): self
105105 {
106106 return new self ($ this );
107107 }
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public function clear()
4040 /**
4141 * @inheritdoc
4242 */
43- public function copy (): Collection
43+ public function copy (): self
4444 {
4545 return new self ($ this ->vector );
4646 }
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public function jsonSerialize()
3939 */
4040 public function copy (): self
4141 {
42- return new self ($ this );
42+ return new static ($ this );
4343 }
4444
4545 /**
You can’t perform that action at this time.
0 commit comments