-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
The class StaticInstance does not do anything meaningful (and thus is misleading).
It has a static property $instance that is probably meant to store the instance so that it can be retrieved later on and that one instance is shared across all requests.
However, in the getInstance() method, that property is always overwritten by a new instance of the extending class, rendering it useless. So, each call to getInstance() will create a new instance instead of sharing the previous one.
The getInstance() is probably missing a check to only create a new instance when the $instance property has not been set yet.
Reactions are currently unavailable