Compare commits
2 Commits
9dadc3518a
...
0.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c9332a0f4 | |||
| 3dd31e21fe |
@@ -1,3 +1,3 @@
|
||||
# Template
|
||||
# Cloneable
|
||||
|
||||
Potter Framework Component Template
|
||||
Potter Framework Cloneable Interface
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "potter/template",
|
||||
"description": "Potter Framework Component Template",
|
||||
"name": "potter/cloneable",
|
||||
"description": "Potter Framework Cloneable Interface",
|
||||
"type": "library",
|
||||
"require": {
|
||||
"php": "^8.5"
|
||||
@@ -8,7 +8,7 @@
|
||||
"license": "MIT",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Potter\\": "src/Potter/"
|
||||
"Potter\\Cloneable\\": "src/Potter/Cloneable/"
|
||||
}
|
||||
},
|
||||
"authors": [
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Cloneable;
|
||||
|
||||
interface CloneableInterface
|
||||
{
|
||||
public function clone(): static;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Cloneable;
|
||||
|
||||
trait CloneableTrait
|
||||
{
|
||||
final public function clone(): static
|
||||
{
|
||||
return clone $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user