Skip to content

Commit 2d5b59d

Browse files
committed
update: use isset on Collection.get
1 parent e5fdcca commit 2d5b59d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Std/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function add(string $name, $value): self
9393
*/
9494
public function get(string $key, mixed $default = null): mixed
9595
{
96-
return $this->has($key) ? $this->data[$key] : $default;
96+
return $this->data[$key] ?? $default;
9797
}
9898

9999
/**

0 commit comments

Comments
 (0)