Completed
Push — master ( 3bb67e...6a3f6b )
by mw
02:11
created

ApprovedRevsFacade   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getApprovedRevID() 0 3 1
A hasApprovedRevision() 0 3 1
1
<?php
2
3
namespace SMW\ApprovedRevs;
4
5
use Title;
6
use ApprovedRevs;
7
8
/**
9
 * The original `ApprovedRevs` consist of only static methods which are not mockable
10
 * or useful for any serious unit testing hence we use a facade to access an
11
 * instance.
12
 *
13
 * @license GNU GPL v2+
14
 * @since 1.0
15
 *
16
 * @author mwjames
17
 */
18
class ApprovedRevsFacade {
19
20
	/**
21
	 * @since  1.0
22
	 *
23
	 * @param Title $title
24
	 *
25
	 * @return integer|null
26
	 */
27 1
	public function getApprovedRevID( Title $title ) {
28 1
		return ApprovedRevs::getApprovedRevID( $title );
29
	}
30
31
	/**
32
	 * @since  1.0
33
	 *
34
	 * @param Title $title
35
	 *
36
	 * @return boolean
37
	 */
38 1
	public function hasApprovedRevision( Title $title ) {
39 1
		return ApprovedRevs::hasApprovedRevision( $title );
40
	}
41
42
}
43