Skip to content

Commit 0397f1b

Browse files
authored
Merge pull request #55 from justcoded/feature/update-for-php8
small updates for php8
2 parents 66dde1c + 0c92aaa commit 0397f1b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

framework/Objects/Singleton.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ protected function __construct() {
3131
*
3232
* @return void
3333
*/
34-
final private function __clone() {
34+
final public function __clone() {
35+
throw new \RuntimeException(static::class . ' is singleton and cannot be cloned/serialized.');
3536
}
3637

3738
/**
@@ -40,7 +41,8 @@ final private function __clone() {
4041
*
4142
* @return void
4243
*/
43-
final private function __wakeup() {
44+
final public function __wakeup() {
45+
throw new \RuntimeException(static::class . ' is singleton and cannot be cloned/serialized.');
4446
}
4547

4648
}

0 commit comments

Comments
 (0)