Completed
Pull Request — master (#13)
by Peter
06:35
created

IndexStreamException::failedRename()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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