diff --git a/src/Potter/Cloneable/AbstractCloneable.php b/src/Potter/Cloneable/AbstractCloneable.php index b65a35d..5096dfc 100644 --- a/src/Potter/Cloneable/AbstractCloneable.php +++ b/src/Potter/Cloneable/AbstractCloneable.php @@ -6,5 +6,5 @@ namespace Potter\Cloneable; abstract class AbstractCloneable implements CloneableInterface { - + abstract public function clone(): CloneableInterface; } diff --git a/src/Potter/Cloneable/CloneableInterface.php b/src/Potter/Cloneable/CloneableInterface.php index 7fcc385..9a3650d 100644 --- a/src/Potter/Cloneable/CloneableInterface.php +++ b/src/Potter/Cloneable/CloneableInterface.php @@ -6,5 +6,5 @@ namespace Potter\Cloneable; interface CloneableInterface { - + public function clone(): self; } diff --git a/src/Potter/Cloneable/CloneableTrait.php b/src/Potter/Cloneable/CloneableTrait.php index a734830..e1e2b5b 100644 --- a/src/Potter/Cloneable/CloneableTrait.php +++ b/src/Potter/Cloneable/CloneableTrait.php @@ -6,5 +6,8 @@ namespace Potter\Cloneable; trait CloneableTrait { - + final public function clone(): CloneableInterface + { + return clone $this; + } }