Merge pull request #478 from MathiasReker/0-self-static-accessor

Self static accessor
This commit is contained in:
Dominik Liebler
2022-06-17 14:58:20 +02:00
committed by GitHub

View File

@@ -15,11 +15,11 @@ final class Singleton
*/
public static function getInstance(): Singleton
{
if (static::$instance === null) {
static::$instance = new static();
if (self::$instance === null) {
self::$instance = new self();
}
return static::$instance;
return self::$instance;
}
/**