StubFileFetcher   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A fetchFile() 0 4 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace FileFetcher;
6
7
/**
8
 * @since 4.2
9
 *
10
 * @licence BSD-3-Clause
11
 * @author Jeroen De Dauw < [email protected] >
12
 */
13
class StubFileFetcher implements FileFetcher {
14
15
	private $stubReturnValue;
16
17 1
	public function __construct( string $stubReturnValue ) {
18 1
		$this->stubReturnValue = $stubReturnValue;
19 1
	}
20
21
	// @codingStandardsIgnoreStart
22 1
	public function fetchFile( string $fileUrl ): string {
23
		// @codingStandardsIgnoreEnd
24 1
		return $this->stubReturnValue;
25
	}
26
27
}
28