UnreadableFileException::forFileInfo()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 9
ccs 7
cts 7
cp 1
rs 9.6666
cc 1
eloc 5
nc 1
nop 1
crap 1
1
<?php
2
3
namespace League\Flysystem;
4
5
use SplFileInfo;
6
7
class UnreadableFileException extends Exception
8
{
9 3
    public static function forFileInfo(SplFileInfo $fileInfo)
10
    {
11 3
        return new static(
12 3
            sprintf(
13 3
                'Unreadable file encountered: %s',
14 3
                $fileInfo->getRealPath()
15 3
            )
16 3
        );
17
    }
18
}
19