FileFetchingException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 19
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFileUrl() 0 3 1
A __construct() 0 9 2
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace FileFetcher;
6
7
/**
8
 * @since 3.0
9
 *
10
 * @licence BSD-3-Clause
11
 * @author Jeroen De Dauw < [email protected] >
12
 */
13
class FileFetchingException extends \RuntimeException {
14
15
	private $fileUrl;
16
17 4
	public function __construct( string $fileUrl, string $message = null, \Exception $previous = null ) {
18 4
		$this->fileUrl = $fileUrl;
19
20 4
		parent::__construct(
21 4
			$message ?: 'Could not fetch file: ' . $fileUrl,
22 4
			0,
23
			$previous
24
		);
25 4
	}
26
27 1
	public function getFileUrl(): string {
28 1
		return $this->fileUrl;
29
	}
30
31
}
32