From 83dfd7ed72ed41d331c4bfb30ff219b8e78914d5 Mon Sep 17 00:00:00 2001 From: Jay Potter Date: Sat, 25 Oct 2025 11:32:29 -0400 Subject: [PATCH] Add set() Method --- src/Potter/Aware/AbstractAware.php | 1 + src/Potter/Aware/AwareTrait.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/Potter/Aware/AbstractAware.php b/src/Potter/Aware/AbstractAware.php index 1bd71e9..8ad8482 100644 --- a/src/Potter/Aware/AbstractAware.php +++ b/src/Potter/Aware/AbstractAware.php @@ -8,4 +8,5 @@ abstract class AbstractAware implements AwareInterface { abstract public function get(string $key): mixed; abstract public function has(string $key): bool; + abstract protected function set(string $key, mixed $value): mixed; } diff --git a/src/Potter/Aware/AwareTrait.php b/src/Potter/Aware/AwareTrait.php index bab3250..5baf907 100644 --- a/src/Potter/Aware/AwareTrait.php +++ b/src/Potter/Aware/AwareTrait.php @@ -17,4 +17,9 @@ trait AwareTrait { return array_key_exists($key, $this->aware); } + + final protected function set(string $key, mixed $value): mixed + { + return $this->aware[$key] = $value; + } }