Completed
Pull Request — master (#13)
by Peter
03:22 queued 54s
created

IndexStreamException::undefinedSubstreamFile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * Lupin package.
6
 *
7
 * @author    Peter Gribanov <[email protected]>
8
 * @copyright Copyright (c) 2011, Peter Gribanov
9
 */
10
11
namespace GpsLab\Component\Sitemap\Stream\Exception;
12
13
final class IndexStreamException extends \RuntimeException
14
{
15
    /**
16
     * @param string $filename
17
     *
18
     * @return self
19
     */
20
    public static function undefinedSubstreamFile(string $filename): self
21
    {
22
        return new self(sprintf('Substream file "%s" not exists or not readable.', $filename));
23
    }
24
25
    /**
26
     * @param string $source
27
     * @param string $target
28
     *
29
     * @return self
30
     */
31
    public static function failedRename(string $source, string $target): self
32
    {
33
        return new self(sprintf('Failed rename sitemap file "%s" to "%s".', $source, $target));
34
    }
35
}
36