Add unset() Method

This commit is contained in:
2025-10-25 12:02:18 -04:00
parent 287395aba5
commit 4dd0e11339
2 changed files with 6 additions and 0 deletions

View File

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

View File

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