get() Method Throws NotFoundException
This commit is contained in:
@@ -14,7 +14,10 @@ trait AwareTrait
|
|||||||
|
|
||||||
final public function get(string $key): mixed
|
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
|
final public function has(string $key): bool
|
||||||
|
|||||||
Reference in New Issue
Block a user