We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2edb246 commit 5fdaa28Copy full SHA for 5fdaa28
composer.json
@@ -1,7 +1,7 @@
1
{
2
"name": "okapi/singleton",
3
"description": "PHP Singleton is a PHP library that allows you to create singleton classes with a trait.",
4
- "version": "1.0.0",
+ "version": "1.0.1",
5
"type": "library",
6
"homepage": "https://github.com/okapi-web/php-singleton",
7
"license": "MIT",
src/Singleton.php
@@ -15,10 +15,10 @@ trait Singleton
15
/**
16
* Singleton instance.
17
*
18
- * @var self
+ * @var self|null
19
* @noinspection PhpDocFieldTypeMismatchInspection
20
*/
21
- private static self $instance;
+ private static ?self $instance = null;
22
23
24
* Whether the instance has been initialized.
0 commit comments