Total Complexity | 3 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | trait Creator |
||
6 | { |
||
7 | /** |
||
8 | * Holds the only instance of me |
||
9 | * @var mixed |
||
10 | */ |
||
11 | protected static $singleton = null; |
||
12 | |||
13 | public function destroy() |
||
14 | { |
||
15 | self::$singleton = null; |
||
16 | } |
||
17 | |||
18 | /** |
||
19 | * Create the only instance of me and return it |
||
20 | * @return mixed |
||
21 | */ |
||
22 | public static function create() |
||
29 | } |
||
30 | } |
||
31 |