Require Cloneable
This commit is contained in:
@@ -2,7 +2,8 @@
|
|||||||
"name": "potter/aware",
|
"name": "potter/aware",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.4"
|
"php": "^8.4",
|
||||||
|
"potter/cloneable": "dev-main"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Potter\Aware;
|
namespace Potter\Aware;
|
||||||
|
|
||||||
|
use \Potter\Cloneable\CloneableInterface;
|
||||||
|
|
||||||
trait AwareTrait
|
trait AwareTrait
|
||||||
{
|
{
|
||||||
private array $aware = [];
|
private array $aware = [];
|
||||||
@@ -22,4 +24,6 @@ trait AwareTrait
|
|||||||
{
|
{
|
||||||
return $this->aware[$key] = $value;
|
return $this->aware[$key] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abstract public function clone(): CloneableInterface;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user