PluginProbe ʕ •ᴥ•ʔ
WP 2FA – Two-factor authentication for WordPress / 2.9.0
WP 2FA – Two-factor authentication for WordPress v2.9.0
4.0.0 1.7.1 2.0.0 2.0.1 2.1.0 2.2.0 2.2.1 2.3.0 2.4.0 2.4.1 2.4.2 2.5.0 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.7.0 2.8.0 2.9.0 2.9.1 2.9.2 2.9.3 3.0.0 3.0.1 3.1.0 3.1.1 3.1.1.2 trunk 1.2.0 1.3.0 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.6.0 1.6.1 1.6.2 1.7.0
wp-2fa / includes / classes / dasprid / enum / src / NullValue.php
wp-2fa / includes / classes / dasprid / enum / src Last commit date
Exception 11 months ago AbstractEnum.php 11 months ago EnumMap.php 11 months ago NullValue.php 11 months ago
NullValue.php
50 lines
1 <?php
2
3 declare (strict_types=1);
4 namespace WP2FA_Vendor\DASPRiD\Enum;
5
6 use WP2FA_Vendor\DASPRiD\Enum\Exception\CloneNotSupportedException;
7 use WP2FA_Vendor\DASPRiD\Enum\Exception\SerializeNotSupportedException;
8 use WP2FA_Vendor\DASPRiD\Enum\Exception\UnserializeNotSupportedException;
9 final class NullValue
10 {
11 /**
12 * @var self
13 */
14 private static $instance;
15 private function __construct()
16 {
17 }
18 public static function instance() : self
19 {
20 return self::$instance ?: (self::$instance = new self());
21 }
22 /**
23 * Forbid cloning enums.
24 *
25 * @throws CloneNotSupportedException
26 */
27 public final function __clone()
28 {
29 throw new CloneNotSupportedException();
30 }
31 /**
32 * Forbid serializing enums.
33 *
34 * @throws SerializeNotSupportedException
35 */
36 public final function __sleep() : array
37 {
38 throw new SerializeNotSupportedException();
39 }
40 /**
41 * Forbid unserializing enums.
42 *
43 * @throws UnserializeNotSupportedException
44 */
45 public final function __wakeup() : void
46 {
47 throw new UnserializeNotSupportedException();
48 }
49 }
50