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 df19866 commit f3ed42aCopy full SHA for f3ed42a
src/Illuminate/Collections/Collection.php
@@ -589,7 +589,7 @@ public function has($key)
589
/**
590
* Determine if any of the keys exist in the collection.
591
*
592
- * @param mixed $key
+ * @param TKey|array<array-key, TKey> $key
593
* @return bool
594
*/
595
public function hasAny($key)
@@ -601,7 +601,7 @@ public function hasAny($key)
601
$keys = is_array($key) ? $key : func_get_args();
602
603
foreach ($keys as $value) {
604
- if ($this->has($value)) {
+ if (array_key_exists($value, $this->items)) {
605
return true;
606
}
607
0 commit comments