NotSupportedException   A
last analyzed

↳ Parent: Project

Coupling/Cohesion

Components 0
Dependencies 0

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 30
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A forLink() 0 6 1
A forFtpSystemType() 0 6 1
1
<?php
2
3
namespace League\Flysystem;
4
5
use RuntimeException;
6
use SplFileInfo;
7
8
class NotSupportedException extends RuntimeException
9
{
10
    /**
11
     * Create a new exception for a link.
12
     *
13
     * @param SplFileInfo $file
14
     *
15
     * @return static
16
     */
17 3
    public static function forLink(SplFileInfo $file)
18
    {
19 3
        $message = 'Links are not supported, encountered link at ';
20
21 3
        return new static($message . $file->getPathname());
22
    }
23
24
    /**
25
     * Create a new exception for a link.
26
     *
27
     * @param string $systemType
28
     *
29
     * @return static
30
     */
31 3
    public static function forFtpSystemType($systemType)
32
    {
33 3
        $message = "The FTP system type '$systemType' is currently not supported.";
34
35 3
        return new static($message);
36
    }
37
}
38