1 | <?php |
||
10 | abstract class CheckDefinition |
||
11 | { |
||
12 | /** @var \Spatie\ServerMonitor\Models\Check */ |
||
13 | protected $check; |
||
14 | |||
15 | /** |
||
16 | * @param \Spatie\ServerMonitor\Models\Check $check |
||
17 | * |
||
18 | * @return $this |
||
19 | */ |
||
20 | public function setCheck(Check $check) |
||
26 | |||
27 | public function getCommand(): string |
||
31 | |||
32 | public function handleFinishedProcess(Process $process) |
||
48 | |||
49 | abstract public function handleSuccessfulProcess(Process $process); |
||
50 | |||
51 | public function handleFailedProcess(Process $process) |
||
55 | |||
56 | public function throttleFailingNotificationsForMinutes(): int |
||
60 | |||
61 | public function performNextRunInMinutes(): int |
||
69 | |||
70 | public function timeoutInSeconds(): int |
||
74 | } |
||
75 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: