Completed
Push — master ( 3f5086...28f5b7 )
by mw
02:06
created

ApprovedRevsFacade::getApprovedFileInfo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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
	 * @since  1.0
44
	 *
45
	 * @param Title $title
46
	 *
47
	 * @return []
0 ignored issues
show
Documentation introduced by
The doc-type [] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
48
	 */
49 1
	public function getApprovedFileInfo( Title $title ) {
50 1
		return ApprovedRevs::getApprovedFileInfo( $title );
51
	}
52
53
}
54