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 / MonitorConfig.php

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

103 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 final class MonitorConfig
7 {
8 /**
9 * @var MonitorSchedule The schedule of the monitor
10 */
11 private $schedule;
12 /**
13 * @var int|null The check-in margin in minutes
14 */
15 private $checkinMargin;
16 /**
17 * @var int|null The maximum runtime in minutes
18 */
19 private $maxRuntime;
20 /**
21 * @var string|null The timezone
22 */
23 private $timezone;
24 /**
25 * @var int|null The number of consecutive failed check-ins it takes before an issue is created
26 */
27 private $failureIssueThreshold;
28 /**
29 * @var int|null The number of consecutive OK check-ins it takes before an issue is resolved
30 */
31 private $recoveryThreshold;
32 public function __construct(MonitorSchedule $schedule, ?int $checkinMargin = null, ?int $maxRuntime = null, ?string $timezone = null, ?int $failureIssueThreshold = null, ?int $recoveryThreshold = null)
33 {
34 $this->schedule = $schedule;
35 $this->checkinMargin = $checkinMargin;
36 $this->maxRuntime = $maxRuntime;
37 $this->timezone = $timezone;
38 $this->failureIssueThreshold = $failureIssueThreshold;
39 $this->recoveryThreshold = $recoveryThreshold;
40 }
41 public function getSchedule() : MonitorSchedule
42 {
43 return $this->schedule;
44 }
45 public function setSchedule(MonitorSchedule $schedule) : self
46 {
47 $this->schedule = $schedule;
48 return $this;
49 }
50 public function getCheckinMargin() : ?int
51 {
52 return $this->checkinMargin;
53 }
54 public function setCheckinMargin(?int $checkinMargin) : self
55 {
56 $this->checkinMargin = $checkinMargin;
57 return $this;
58 }
59 public function getMaxRuntime() : ?int
60 {
61 return $this->maxRuntime;
62 }
63 public function setMaxRuntime(?int $maxRuntime) : self
64 {
65 $this->maxRuntime = $maxRuntime;
66 return $this;
67 }
68 public function getTimezone() : ?string
69 {
70 return $this->timezone;
71 }
72 public function setTimezone(?string $timezone) : self
73 {
74 $this->timezone = $timezone;
75 return $this;
76 }
77 public function getFailureRecoveryThreshold() : ?int
78 {
79 return $this->failureIssueThreshold;
80 }
81 public function setFailureRecoveryThreshold(?int $failureIssueThreshold) : self
82 {
83 $this->failureIssueThreshold = $failureIssueThreshold;
84 return $this;
85 }
86 public function getRecoveryThreshold() : ?int
87 {
88 return $this->recoveryThreshold;
89 }
90 public function setRecoveryThreshold(?int $recoveryThreshold) : self
91 {
92 $this->recoveryThreshold = $recoveryThreshold;
93 return $this;
94 }
95 /**
96 * @return array<string, mixed>
97 */
98 public function toArray() : array
99 {
100 return ['schedule' => $this->schedule->toArray(), 'checkin_margin' => $this->checkinMargin, 'max_runtime' => $this->maxRuntime, 'timezone' => $this->timezone, 'failure_issue_threshold' => $this->failureIssueThreshold, 'recovery_threshold' => $this->recoveryThreshold];
101 }
102 }
103