| @@ -1,9 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Imagify\Traits; |
| 3 | 3 | |
| 4 | -defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); | |
| 5 | - | |
| 6 | 4 | /** |
| 7 | 5 | * Trait that simulates a singleton pattern. |
| 8 | 6 | * The idea is more to ease the instance retrieval than to prevent multiple instances. |
| 9 | 7 | * This is temporary, until we get a DI container. |
| @@ -16,14 +14,14 @@ | ||
| 16 | 14 | |
| 17 | 15 | /** |
| 18 | 16 | * The "not-so-single" instance of the class. |
| 19 | 17 | * |
| 20 | - * @var object | |
| 18 | + * @var ?object | |
| 21 | 19 | * @since 1.9 |
| 22 | 20 | * @access protected |
| 23 | 21 | * @author Grégory Viguier |
| 24 | 22 | */ |
| 25 | - protected static $instance; | |
| 23 | + protected static $instance = null; | |
| 26 | 24 | |
| 27 | 25 | /** |
| 28 | 26 | * Get the main Instance. |
| 29 | 27 | * |