PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.22
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.22
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 1.10.1 All 168 releases
woocommerce-pos / vendor_prefixed / sentry / sentry / src / MonitorScheduleUnit.php

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

56 lines 1.3 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 final class MonitorScheduleUnit implements \Stringable
7 {
8 /**
9 * @var string The value of the enum instance
10 */
11 private $value;
12 /**
13 * @var array<string, self> A list of cached enum instances
14 */
15 private static $instances = [];
16 private function __construct(string $value)
17 {
18 $this->value = $value;
19 }
20 public static function minute() : self
21 {
22 return self::getInstance('minute');
23 }
24 public static function hour() : self
25 {
26 return self::getInstance('hour');
27 }
28 public static function day() : self
29 {
30 return self::getInstance('day');
31 }
32 public static function week() : self
33 {
34 return self::getInstance('week');
35 }
36 public static function month() : self
37 {
38 return self::getInstance('month');
39 }
40 public static function year() : self
41 {
42 return self::getInstance('year');
43 }
44 public function __toString() : string
45 {
46 return $this->value;
47 }
48 private static function getInstance(string $value) : self
49 {
50 if (!isset(self::$instances[$value])) {
51 self::$instances[$value] = new self($value);
52 }
53 return self::$instances[$value];
54 }
55 }
56