InvalidRequestException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getPath() 0 3 1
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 InvalidRequestException extends Exception {
11
	/**
12
	 * @var string
13
	 */
14
	protected $path;
15
16
	public function __construct(string $path = "", int $code = 0, \Throwable $previous = null) {
17
		$class = get_class($this);
18
		$parts = explode('\\', $class);
19
		$baseName = array_pop($parts);
20 434
		parent::__construct('Invalid request for ' . $path . ' (' . $baseName . ')', $code, $previous);
21 434
		$this->path = $path;
22 434
	}
23 434
24 434
	/**
25 434
	 * @return string
26 434
	 */
27
	public function getPath() {
28
		return $this->path;
29
	}
30
}
31