@@ 71-84 (lines=14) @@ | ||
68 | /** |
|
69 | * @inheritDoc |
|
70 | */ |
|
71 | public function contains(...$values): bool |
|
72 | { |
|
73 | if ( ! $values) { |
|
74 | return false; |
|
75 | } |
|
76 | ||
77 | foreach ($values as $value) { |
|
78 | if ($this->find($value) === false) { |
|
79 | return false; |
|
80 | } |
|
81 | } |
|
82 | ||
83 | return true; |
|
84 | } |
|
85 | ||
86 | /** |
|
87 | * @inheritDoc |
@@ 202-215 (lines=14) @@ | ||
199 | /** |
|
200 | * |
|
201 | */ |
|
202 | private function contains(string $lookup, array $values): bool |
|
203 | { |
|
204 | if (empty($values)) { |
|
205 | return false; |
|
206 | } |
|
207 | ||
208 | foreach ($values as $value) { |
|
209 | if ( ! $this->$lookup($value)) { |
|
210 | return false; |
|
211 | } |
|
212 | } |
|
213 | ||
214 | return true; |
|
215 | } |
|
216 | ||
217 | /** |
|
218 | * Returns whether an association for all of zero or more keys exist. |
@@ 96-109 (lines=14) @@ | ||
93 | * @return bool true if at least one value was provided and the set |
|
94 | * contains all given values, false otherwise. |
|
95 | */ |
|
96 | public function contains(...$values): bool |
|
97 | { |
|
98 | if ( ! $values) { |
|
99 | return false; |
|
100 | } |
|
101 | ||
102 | foreach ($values as $value) { |
|
103 | if ( ! $this->table->hasKey($value)) { |
|
104 | return false; |
|
105 | } |
|
106 | } |
|
107 | ||
108 | return true; |
|
109 | } |
|
110 | ||
111 | /** |
|
112 | * @inheritDoc |