| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| 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()->throttleFailingNotificationsForMinutes(); |
||
| 16 | |||
| 17 | $throttlePeriodEnd = $this->started_throttling_failing_notifications_at->copy()->addMinutes($throttleDuration); |
||
| 18 | |||
| 19 | return $throttlePeriodEnd->isFuture(); |
||
| 20 | } |
||
| 21 | |||
| 36 |
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: