Update PHPDoc for Singleton trait

This commit is contained in:
Sebastian Meyer 2023-12-20 13:48:35 +01:00
parent ba2ec7a516
commit a0315b8196
1 changed files with 4 additions and 2 deletions

View File

@ -34,6 +34,8 @@ trait Singleton
{
/**
* Holds the singleton instances.
*
* @var array<static>
*/
private static array $singleton = [];
@ -42,7 +44,7 @@ trait Singleton
*
* @param mixed ...$args Constructor parameters
*
* @return static
* @return static The singleton instance
*/
final public static function getInstance(mixed ...$args): static
{
@ -55,7 +57,7 @@ trait Singleton
/**
* This is a singleton class, thus the constructor is private.
*
* Usage: Get an instance of this class by calling self::getInstance()
* Usage: Get an instance of this class by calling getInstance()
*/
abstract private function __construct();