mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-12 16:54:00 +02:00
Adding () after static keyword to make it clearer this is instantiating a new object
This commit is contained in:
@@ -82,7 +82,7 @@ class Singleton
|
|||||||
{
|
{
|
||||||
static $instance = null;
|
static $instance = null;
|
||||||
if (null === $instance) {
|
if (null === $instance) {
|
||||||
$instance = new static;
|
$instance = new static();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $instance;
|
return $instance;
|
||||||
|
Reference in New Issue
Block a user