TitleFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A newFromText() 0 3 1
1
<?php
2
3
namespace SubPageList;
4
5
use Title;
6
7
/**
8
 * Factory to construct Title objects.
9
 *
10
 * This avoids the need to have static calls from all the code that
11
 * needs to construct a Title, and thus allows for looser coupling.
12
 *
13
 * @since 1.0
14
 *
15
 * @licence GNU GPL v2+
16
 * @author Jeroen De Dauw < [email protected] >
17
 */
18
class TitleFactory {
19
20
	/**
21
	 * @param string $text
22
	 * @param int $defaultNamespace
23
	 *
24
	 * @return null|Title
25
	 */
26 23
	public function newFromText( $text, $defaultNamespace = NS_MAIN ) {
27 23
		return Title::newFromText( $text, $defaultNamespace );
28
	}
29
30
}
31