We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 66dde1c + 0c92aaa commit 0397f1bCopy full SHA for 0397f1b
framework/Objects/Singleton.php
@@ -31,7 +31,8 @@ protected function __construct() {
31
*
32
* @return void
33
*/
34
- final private function __clone() {
+ final public function __clone() {
35
+ throw new \RuntimeException(static::class . ' is singleton and cannot be cloned/serialized.');
36
}
37
38
/**
@@ -40,7 +41,8 @@ final private function __clone() {
40
41
42
43
- final private function __wakeup() {
44
+ final public function __wakeup() {
45
46
47
48
0 commit comments