Completed
Push — master ( 7de1b7...11eee4 )
by Jeroen De
05:46 queued 03:17
created

StubFileFetcher::fetchFile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
declare( strict_types=1 );
4
5
namespace FileFetcher;
6
7
/**
8
 * @since 4.2
9
 *
10
 * @licence GNU GPL v2+
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