PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | inc/Helpers/Singleton.php +24 -24 4.3.9.14.4.8 View file →
@@ -1,24 +1,24 @@
1 -<?php
2 -
3 -/**
4 - * Class Singleton
5 - */
6 -
7 -namespace LearnPress\Helpers;
8 -
9 -trait Singleton {
10 - private static $instance = null;
11 - final public static function instance(): self {
12 - if ( is_null( static::$instance ) ) {
13 - static::$instance = new static();
14 - }
15 -
16 - return static::$instance;
17 - }
18 -
19 - final private function __construct() {
20 - $this->init();
21 - }
22 -
23 - abstract function init();
24 -}
1 +<?php
2 +
3 +/**
4 + * Class Singleton
5 + */
6 +
7 +namespace LearnPress\Helpers;
8 +
9 +trait Singleton {
10 + private static $instance = null;
11 + final public static function instance(): self {
12 + if ( is_null( static::$instance ) ) {
13 + static::$instance = new static();
14 + }
15 +
16 + return static::$instance;
17 + }
18 +
19 + final private function __construct() {
20 + $this->init();
21 + }
22 +
23 + abstract public function init();
24 +}