Completed
Push — master ( 94f5e8...a88b9e )
by Lars
01:57 queued 11s
created

RenameException::unableToMoveFile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 0
cts 5
cp 0
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace voku\cache\Exception;
6
7
final class RenameException extends \RuntimeException implements FileErrorExceptionInterface
8
{
9
    /**
10
     * @param string $source
11
     * @param string $target
12
     *
13
     * @return self
14
     */
15
    public static function unableToMoveFile($source, $target)
16
    {
17
        return new self(\sprintf(
18
            'Could not move file "%s" to location "%s": '
19
            . 'either the source file is not readable, or the destination is not writable',
20
            $source,
21
            $target
22
        ));
23
    }
24
}
25