NullRequest   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

7 Methods

Rating   Name   Duplication   Size   Complexity  
A ping() 0 3 1
A setOption() 0 1 1
A getOption() 0 1 1
A getLastTransferInfo() 0 3 1
A getLastError() 0 3 1
A getLastErrorCode() 0 3 1
A execute() 0 1 1
1
<?php
2
3
namespace Onoi\HttpRequest;
4
5
/**
6
 * @license GNU GPL v2+
7
 * @since 1.0
8
 *
9
 * @author mwjames
10
 */
11
class NullRequest implements HttpRequest {
12
13
	/**
14
	 * @since 1.0
15
	 *
16
	 * {@inheritDoc}
17
	 */
18 1
	public function ping() {
19 1
		return false;
20
	}
21
22
	/**
23
	 * @since 1.0
24
	 *
25
	 * {@inheritDoc}
26
	 */
27
	public function setOption( $name, $value ) {}
28
29
	/**
30
	 * @since 1.0
31
	 *
32
	 * {@inheritDoc}
33
	 */
34
	public function getOption( $name ) {}
35
36
	/**
37
	 * @since 1.0
38
	 *
39
	 * {@inheritDoc}
40
	 */
41 1
	public function getLastTransferInfo( $name = null ) {
42 1
		return null;
43
	}
44
45
	/**
46
	 * @since 1.0
47
	 *
48
	 * {@inheritDoc}
49
	 */
50 1
	public function getLastError() {
51 1
		return '';
52
	}
53
54
	/**
55
	 * @since 1.0
56
	 *
57
	 * {@inheritDoc}
58
	 */
59 1
	public function getLastErrorCode() {
60 1
		return 0;
61
	}
62
63
	/**
64
	 * @since 1.0
65
	 *
66
	 * {@inheritDoc}
67
	 */
68
	public function execute() {}
69
70
}
71