Test Failed
Push — master ( a2d350...d0d57c )
by
unknown
16:25 queued 06:16
created

InvalidPhonenumber   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 6
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A configurationNotSet() 0 4 1
1
<?php
2
3
namespace NotificationChannels\AfricasTalking\Exceptions;
4
5
use Exception;
6
7
class InvalidPhonenumber extends Exception
8
{
9
    public static function configurationNotSet(): self
10
    {
11
        return new static(
12
            "please provide a phonenumber to which the notification(SMS) will be sent to, you can do these in three ways: 
13
            1) by defining a routeNotificationForAfricasTalking method on your notifiable entity
14
             or
15
            2) by creating a new column called `phone` in your notifiable table
16
            3) by chaining from(phonenumber) method to your AfricasTalkingMessage() eg (new AfricasTalkingMessage())
17
              ->content('Your SMS message content')->to(11111111); method in your event class 
18
            "
19
        );
20
    }
21
}
22