Skip to content

Commit d7d54ba

Browse files
Add return type
When we return the return type of getInstance() IDEs can determine the returnes class and thus provide auto-complete information
1 parent 894b43c commit d7d54ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Singleton.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ final private function __clone()
1313
{
1414
throw new Exception('You can not clone a singleton.');
1515
}
16-
16+
17+
/**
18+
* @return static
19+
*/
1720
public static function getInstance()
1821
{
1922
static $instances;

0 commit comments

Comments
 (0)