Add set() Method

This commit is contained in:
2025-10-25 11:32:29 -04:00
parent 6454fa61fc
commit 83dfd7ed72
2 changed files with 6 additions and 0 deletions

View File

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

View File

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