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 ( 7392fc...b66279 )
by Gregorio
04:48 queued 02:32
created

CouldNotSendNotification::invalidReceiver()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php
2
3
namespace NotificationChannels\Twilio\Exceptions;
4
5
use NotificationChannels\Twilio\SmsMessage;
6
use NotificationChannels\Twilio\CallMessage;
7
8
class CouldNotSendNotification extends \Exception
9
{
10
    /**
11
     * @param mixed $message
12
     *
13
     * @return static
14
     */
15 2
    public static function invalidMessageObject($message)
16
    {
17 2
        $className = get_class($message) ?: 'Unknown';
18
19 1
        return new static(
20 1
            "Notification was not sent. Message object class `{$className}` is invalid. It should
21 1
            be either `".SmsMessage::class.'` or `'.CallMessage::class.'`');
22
    }
23
24
    /**
25
     * @return static
26
     */
27 1
    public static function missingFrom()
28
    {
29 1
        return new static('Notification was not sent. Missing `from` number.');
30
    }
31
32
    /**
33
     * @return static
34
     */
35 1
    public static function invalidReceiver()
36
    {
37 1
        return new static(
38
            'The notifiable did not have a receiving phone number. Add a routeNotificationForTwilio
39
            method or a phone_number attribute to your notifiable.'
40 1
        );
41
    }
42
43
    public static function missingAlphaNumericSender()
44
    {
45
        return new static(
46
            'Notification was not sent. Missing `alphanumeric_sender` in config'
47
        );
48
    }
49
}
50