Compare commits

..

2 Commits

Author SHA1 Message Date
jay 6c9332a0f4 implement Potter\Cloneable 2026-05-31 18:48:17 -04:00
jay 3dd31e21fe refractor to potter/cloneable 2026-05-31 18:14:45 -04:00
4 changed files with 28 additions and 5 deletions
+2 -2
View File
@@ -1,3 +1,3 @@
# Template # Cloneable
Potter Framework Component Template Potter Framework Cloneable Interface
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "potter/template", "name": "potter/cloneable",
"description": "Potter Framework Component Template", "description": "Potter Framework Cloneable Interface",
"type": "library", "type": "library",
"require": { "require": {
"php": "^8.5" "php": "^8.5"
@@ -8,7 +8,7 @@
"license": "MIT", "license": "MIT",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Potter\\": "src/Potter/" "Potter\\Cloneable\\": "src/Potter/Cloneable/"
} }
}, },
"authors": [ "authors": [
@@ -0,0 +1,10 @@
<?php
declare(strict_types=1);
namespace Potter\Cloneable;
interface CloneableInterface
{
public function clone(): static;
}
+13
View File
@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
namespace Potter\Cloneable;
trait CloneableTrait
{
final public function clone(): static
{
return clone $this;
}
}