PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.24
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.24
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 / CheckIn.php

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

119 lines 3.0 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 use WCPOS\Vendor\Sentry\Util\SentryUid;
7 final class CheckIn
8 {
9 /**
10 * @var string The check-in ID
11 */
12 private $id;
13 /**
14 * @var string The monitor slug
15 */
16 private $monitorSlug;
17 /**
18 * @var CheckInStatus The status of the check-in
19 */
20 private $status;
21 /**
22 * @var string|null The release
23 */
24 private $release;
25 /**
26 * @var string|null The environment
27 */
28 private $environment;
29 /**
30 * @var int|float|null The duration of the check-in in seconds
31 */
32 private $duration;
33 /**
34 * @var MonitorConfig|null The monitor configuration
35 */
36 private $monitorConfig;
37 /**
38 * @param int|float|null $duration The duration of the check-in in seconds
39 */
40 public function __construct(string $monitorSlug, CheckInStatus $status, ?string $id = null, ?string $release = null, ?string $environment = null, $duration = null, ?MonitorConfig $monitorConfig = null)
41 {
42 $this->setMonitorSlug($monitorSlug);
43 $this->setStatus($status);
44 $this->setId($id ?? SentryUid::generate());
45 $this->setRelease($release ?? '');
46 $this->setEnvironment($environment ?? Event::DEFAULT_ENVIRONMENT);
47 $this->setDuration($duration);
48 $this->setMonitorConfig($monitorConfig);
49 }
50 public function getId() : string
51 {
52 return $this->id;
53 }
54 public function setId(string $id) : void
55 {
56 $this->id = $id;
57 }
58 public function getMonitorSlug() : string
59 {
60 return $this->monitorSlug;
61 }
62 public function setMonitorSlug(string $monitorSlug) : self
63 {
64 $this->monitorSlug = $monitorSlug;
65 return $this;
66 }
67 public function getStatus() : CheckInStatus
68 {
69 return $this->status;
70 }
71 public function setStatus(CheckInStatus $status) : self
72 {
73 $this->status = $status;
74 return $this;
75 }
76 public function getRelease() : ?string
77 {
78 return $this->release;
79 }
80 public function setRelease(string $release) : self
81 {
82 $this->release = $release;
83 return $this;
84 }
85 public function getEnvironment() : ?string
86 {
87 return $this->environment;
88 }
89 public function setEnvironment(string $environment) : self
90 {
91 $this->environment = $environment;
92 return $this;
93 }
94 /**
95 * @return int|float|null
96 */
97 public function getDuration()
98 {
99 return $this->duration;
100 }
101 /**
102 * @param int|float|null $duration The duration of the check-in in seconds
103 */
104 public function setDuration($duration) : self
105 {
106 $this->duration = $duration;
107 return $this;
108 }
109 public function getMonitorConfig() : ?MonitorConfig
110 {
111 return $this->monitorConfig;
112 }
113 public function setMonitorConfig(?MonitorConfig $monitorConfig) : self
114 {
115 $this->monitorConfig = $monitorConfig;
116 return $this;
117 }
118 }
119