Completed
Push — master ( 30fe91...a411db )
by Muhammad
09:22 queued 05:05
created

CouldNotSendNotification::authKeyNotProvided()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace NotificationChannels\Gammu\Exceptions;
4
5
class CouldNotSendNotification extends \Exception
6
{
7
    /**
8
     * Thrown when there is no phone Sender ID provided.
9
     *
10
     * @return static
11
     */
12 3
    public static function senderNotProvided()
13
    {
14 3
        return new static('Sender ID was not provided.');
15
    }
16
17
    /**
18
     * Thrown when there is no destination phone number provided.
19
     *
20
     * @return static
21
     */
22 4
    public static function destinationNotProvided()
23
    {
24 4
        return new static('Destination phone number was not provided.');
25
    }
26
27
    /**
28
     * Thrown when there is content provided.
29
     *
30
     * @return static
31
     */
32 4
    public static function contentNotProvided()
33
    {
34 4
        return new static('Content was not provided.');
35
    }
36
37
    /**
38
     * Thrown when there is no Gammu Api auth key provided.
39
     *
40
     * @return static
41
     */
42 2
    public static function authKeyNotProvided()
43
    {
44 2
        return new static('Auth key for Gammu Api was not provided.');
45
    }
46
47
    /**
48
     * Thrown when no Gammu Api URL is provided.
49
     *
50
     * @return static
51
     */
52 2
    public static function apiUrlNotProvided()
53
    {
54 2
        return new static('Gammu Api URL was not provided.');
55
    }
56
57
    /**
58
     * Thrown when method is not provided.
59
     *
60
     * @return static
61
     */
62
    public static function methodNotProvided()
63
    {
64
        return new static('Method for sending Gammu messages was not provided. Available methods ("api", "db").');
65
    }
66
67
    /**
68
     * Thrown when invalid method is provided.
69
     *
70
     * @return static
71
     */
72
    public static function invalidMethodProvided()
73
    {
74
        return new static('Invalid method for sending Gammu messages was provided. Available methods ("api", "db").');
75
    }
76
}
77