| @@ 217-230 (lines=14) @@ | ||
| 214 | /** |
|
| 215 | * |
|
| 216 | */ |
|
| 217 | private function contains(string $lookup, array $values): bool |
|
| 218 | { |
|
| 219 | if (empty($values)) { |
|
| 220 | return false; |
|
| 221 | } |
|
| 222 | ||
| 223 | foreach ($values as $value) { |
|
| 224 | if ( ! $this->$lookup($value)) { |
|
| 225 | return false; |
|
| 226 | } |
|
| 227 | } |
|
| 228 | ||
| 229 | return true; |
|
| 230 | } |
|
| 231 | ||
| 232 | /** |
|
| 233 | * Returns whether an association for all of zero or more keys exist. |
|
| @@ 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 |
|