diff --git a/src/Potter/Aware/AbstractAware.php b/src/Potter/Aware/AbstractAware.php index 8ad8482..a114e21 100644 --- a/src/Potter/Aware/AbstractAware.php +++ b/src/Potter/Aware/AbstractAware.php @@ -9,4 +9,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; + abstract protected function unset(string $key): void; } diff --git a/src/Potter/Aware/AwareTrait.php b/src/Potter/Aware/AwareTrait.php index ba3abb5..547ad50 100644 --- a/src/Potter/Aware/AwareTrait.php +++ b/src/Potter/Aware/AwareTrait.php @@ -25,5 +25,10 @@ trait AwareTrait return $this->aware[$key] = $value; } + final protected function unset(string $key): void + { + unset($this->aware[$key]); + } + abstract public function clone(): CloneableInterface; }