PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.15
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.15
1.10.25 1.10.24 1.10.23 1.10.22 1.10.21 1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 All 169 releases
woocommerce-pos / vendor_prefixed / sentry / sentry / src / CheckInStatus.php

CheckInStatus.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.10.15, at vendor_prefixed/sentry/sentry/src/CheckInStatus.php

47 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare (strict_types=1);
4 namespace WCPOS\Vendor\Sentry;
5
6 /**
7 * This enum represents all the possible status of a check in.
8 */
9 final class CheckInStatus implements \Stringable
10 {
11 /**
12 * @var string The value of the enum instance
13 */
14 private $value;
15 /**
16 * @var array<string, self> A list of cached enum instances
17 */
18 private static $instances = [];
19 private function __construct(string $value)
20 {
21 $this->value = $value;
22 }
23 public static function ok() : self
24 {
25 return self::getInstance('ok');
26 }
27 public static function error() : self
28 {
29 return self::getInstance('error');
30 }
31 public static function inProgress() : self
32 {
33 return self::getInstance('in_progress');
34 }
35 public function __toString() : string
36 {
37 return $this->value;
38 }
39 private static function getInstance(string $value) : self
40 {
41 if (!isset(self::$instances[$value])) {
42 self::$instances[$value] = new self($value);
43 }
44 return self::$instances[$value];
45 }
46 }
47