Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
9 | public function isThrottlingFailedNotifications(): bool |
||
10 | { |
||
11 | if (is_null($this->started_throttling_failing_notifications_at)) { |
||
|
|||
12 | return false; |
||
13 | } |
||
14 | |||
15 | $throttleDuration = $this->getDefinition()->resendFailingNotificationEveryMinutes(); |
||
16 | |||
17 | $throttlePeriodEnd = $this->started_throttling_failing_notifications_at->addMinutes($throttleDuration); |
||
18 | |||
19 | return $throttlePeriodEnd->isFuture(); |
||
20 | } |
||
21 | |||
35 | } |
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: