GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( e97bb7...5f2eb5 )
by Pascal
10:40 queued 09:38
created

resendFailedNotificationAfterMinutes()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace ProtoneMedia\ApiHealth\Checkers;
4
5
trait SendsNotifications
6
{
7
    /**
8
     * Number of minutes until send the failed notification again.
9
     *
10
     * @var int
11
     */
12
    protected $resendFailedNotificationAfterMinutes;
13
14
    /**
15
     * Class name of the failed notification.
16
     *
17
     * @var string
18
     */
19
    protected $failedNotificationClass;
20
21
    /**
22
     * Class name of the recovered notification.
23
     *
24
     * @var string
25
     */
26
    protected $recoveredNotificationClass;
27
28
    /**
29
     * Number of minutes until send the failed notification again.
30
     *
31
     * @return int
32
     */
33
    public function resendFailedNotificationAfterMinutes(): int
34
    {
35
        return !is_null($this->resendFailedNotificationAfterMinutes) ? $this->resendFailedNotificationAfterMinutes : config('api-health.notifications.resend_failed_notification_after_minutes');
36
    }
37
38
    /**
39
     * Class name of the failed notification.
40
     *
41
     * @return string
42
     */
43
    public function failedNotificationClass(): string
44
    {
45
        return $this->failedNotificationClass ?: config('api-health.notifications.default_failed_notification');
46
    }
47
48
    /**
49
     * Class name of the recovered notification.
50
     *
51
     * @return string
52
     */
53
    public function recoveredNotificationClass(): string
54
    {
55
        return $this->recoveredNotificationClass ?: config('api-health.notifications.default_recovered_notification');
56
    }
57
}
58