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; + } }