From 6f05915e066d2b51d994215ec63e7bbbf70ea839 Mon Sep 17 00:00:00 2001 From: Jay Potter Date: Sat, 25 Oct 2025 13:03:01 -0400 Subject: [PATCH] get() Method Throws NotFoundException --- src/Potter/Aware/AwareTrait.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Potter/Aware/AwareTrait.php b/src/Potter/Aware/AwareTrait.php index b11ad50..28bad07 100644 --- a/src/Potter/Aware/AwareTrait.php +++ b/src/Potter/Aware/AwareTrait.php @@ -14,7 +14,10 @@ trait AwareTrait final public function get(string $key): mixed { - return $this->aware[$key]; + if ($this->has($key)) { + return $this->aware[$key]; + } + throw new NotFoundException; } final public function has(string $key): bool