CouldNotCreateMessage   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 12
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A invalidPriority() 0 4 1
A invalidIndent() 0 4 1
1
<?php
2
3
namespace NotificationChannels\Todoist\Exceptions;
4
5
class CouldNotCreateMessage extends \Exception
6
{
7 1
    public static function invalidPriority($priority)
8
    {
9 1
        return new static("Priority `{$priority}` is invalid. It should be a number between 1 and 4, 4 for very urgent and 1 for natural.");
10
    }
11
12 1
    public static function invalidIndent($indent)
13
    {
14 1
        return new static("Indent `{$indent}` is invalid. It should be a a number between 1 and 4, where 1 is top-level.");
15
    }
16
}
17