We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20b6afe commit 6fd1490Copy full SHA for 6fd1490
Mbh/Collection/Traits/Sequenceable/LinkedList.php
@@ -85,7 +85,13 @@ public function clear()
85
86
public function contains(...$values): bool
87
{
88
- return $this->indexOf($values, $f) >= 0;
+ foreach ($values as &$value) {
89
+ if ($this->search($value) === null) {
90
+ return false;
91
+ }
92
93
+
94
+ return true;
95
}
96
97
public function copy()
@@ -398,6 +404,8 @@ protected function validIndex(int $index)
398
404
return $this->offsetExists($index);
399
405
400
406
407
+ abstract protected function emptyGuard($method);
408
401
409
abstract public function isEmpty(): bool;
402
410
403
411
abstract public function search($value);
0 commit comments