InvalidMessage::invalidOriginator()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace NotificationChannels\Cmsms\Exceptions;
4
5
use Exception;
6
7
class InvalidMessage extends Exception
8
{
9 3
    public static function invalidReference(string $reference): self
10
    {
11 3
        return new static("The reference on the CMSMS message may only contain 1 - 32 alphanumeric characters. Was given '{$reference}'");
12
    }
13
14 2
    public static function invalidOriginator(string $originator): self
15
    {
16 2
        return new static("The originator on the CMSMS message may only contain 1 - 11 characters. Was given '{$originator}'");
17
    }
18
19 1
    public static function invalidMultipart(int $minimum, int $maximum): self
20
    {
21 1
        return new static("The number of message parts for sending a multipart message on the CMSMS message may only contain a integer range from 0 to 8. Was given a minimum of '{$minimum}' and maximum of '{$maximum}'");
22
    }
23
}
24