CouldNotSendNotification   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 40
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A contentLengthLimitExceeded() 0 6 1
A missingRecipient() 0 6 1
A apiFailed() 0 4 1
1
<?php
2
/**
3
 * Author: Facundo J Gonzalez
4
 * Date: 17/11/2017.
5
 */
6
7
namespace NotificationChannels\SMSC\Exceptions;
8
9
/**
10
 * Class CouldNotSendNotification.
11
 */
12
class CouldNotSendNotification extends \Exception
13
{
14
    /**
15
     * Get a new could not send notification exception with
16
     * length error message.
17
     *
18
     * @return static
19
     */
20
    public static function contentLengthLimitExceeded()
21
    {
22
        $message = 'The content length is too long for an sms message.';
23
24
        return new static($message);
25
    }
26
27
    /**
28
     * Get a new could not send notification exception with
29
     * missing recipient message.
30
     *
31
     * @return static
32
     */
33
    public static function missingRecipient()
34
    {
35
        $message = 'The recipient of the sms message is missing.';
36
37
        return new static($message);
38
    }
39
40
    /**
41
     * Get a new could not send notification exception with
42
     * missing Recipient message.
43
     *
44
     * @param  string $message
45
     * @return static
46
     */
47
    public static function apiFailed($message)
48
    {
49
        return new static($message);
50
    }
51
}
52