Total Complexity | 3 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
5 | class NoValueMonad |
||
6 | { |
||
7 | private static ?self $instance = null; |
||
8 | |||
9 | 121 | public static function getInstance(): self |
|
10 | { |
||
11 | 121 | if (self::$instance === null) { |
|
12 | 1 | self::$instance = new self(); |
|
13 | } |
||
14 | |||
15 | 121 | return self::$instance; |
|
|
|||
16 | } |
||
17 | |||
18 | 1 | private function __construct() |
|
20 | 1 | } |
|
21 | } |
||
22 |