Test Failed
Push — master ( 4ac6f1...563f56 )
by Andrés
03:26
created

HolidaysPhpException::unsupportedCountry()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 0
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Andreshg112\HolidaysPhp;
4
5
use Exception;
6
7
class HolidaysPhpException extends Exception
8
{
9
    public static function notEmptyCountry(): self
10
    {
11
        return new self('The country must not be empty.');
12
    }
13
14
    public static function notEmptyLanguage(): self
15
    {
16
        return new self('The language must not be empty.');
17
    }
18
19
    public static function notEmptyTitle(): self
20
    {
21
        return new self('The title must not be empty.');
22
    }
23
24 1
    public static function notFound(): self
25
    {
26 1
        return new self('The requested web page could not be found.');
27
    }
28
29
    public static function unrecognizedStructure(): self
30
    {
31
        return new self('The structure of the web page could not be recognized. Maybe it was updated.');
32
    }
33
34
    public static function unsupportedCountry(): self
35
    {
36
        return new self('The specified country is not supported.');
37
    }
38
}
39