Test Failed
Push — master ( 20ba26...d79798 )
by Jeroen
03:31
created

SitemapException::forEmptyUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace JeroenDesloovere\SitemapBundle\Exception;
4
5
class SitemapException extends \Exception
6
{
7
    public static function forEmptyPath(): self
8
    {
9
        return new self('The path you have given is empty.');
10
    }
11
12
    public static function forEmptyUrl(): self
13
    {
14
        return new self('The url you have given is empty.');
15
    }
16
17
    public static function forNotExistingChangeFrequency(string $changeFrequency): self
18
    {
19
        return new self('The given changeFrequency "' . $changeFrequency . '" does not exist.');
20
    }
21
22
    public static function forNotExistingSitemapProvider($sitemapProviderKey): self
23
    {
24
        return new self('The requested sitemap provider with key "' . $sitemapProviderKey . '" does not exist.');
25
    }
26
27
    public static function forPriority(): self
28
    {
29
        return new self('Priority must be a value between 0 and 10.');
30
    }
31
}
32