PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / trunk
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF vtrunk
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
← All changes | classes/Traits/InstanceGetterTrait.php +2 -4 1.10 → trunk View file →
@@ -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 *