Completed
Push — master ( 50c9d0...db51c6 )
by Robin
06:58
created

Exception   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A unknown() 0 8 2
1
<?php
2
/**
3
 * Copyright (c) 2014 Robin Appelman <[email protected]>
4
 * This file is licensed under the Licensed under the MIT license:
5
 * http://opensource.org/licenses/MIT
6
 */
7
8
namespace Icewind\SMB\Exception;
9
10
class Exception extends \Exception {
11 2
	static public function unknown($path, $error) {
12 2
		$message = 'Unknown error (' . $error . ')';
13 2
		if ($path) {
14 2
			$message .= ' for ' . $path;
15 2
		}
16
17 2
		return new Exception($message, $error);
18
	}
19
}
20