Completed
Pull Request — master (#9)
by Owen
11:24 queued 23s
created

CouldNotSendNotification::authKeyNotProvided()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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
    public static function senderNotProvided()
13
    {
14
        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
    public static function destinationNotProvided()
23
    {
24
        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
    public static function contentNotProvided()
33
    {
34
        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
    public static function authKeyNotProvided()
43
    {
44
        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
    public static function apiUrlNotProvided()
53
    {
54
        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