WP3   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 9
c 2
b 0
f 0
dl 0
loc 31
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getDbName() 0 5 1
A getTableTest() 0 3 1
A getVersion() 0 3 1
A getPrefix() 0 5 1
A getName() 0 3 1
1
<?php
2
/**
3
 * @name      OpenImporter
4
 * @copyright OpenImporter contributors
5
 * @license   BSD https://opensource.org/licenses/BSD-3-Clause
6
 *
7
 * @version 1.0
8
 */
9
10
/**
11
 * Class WP3
12
 * Wordpress 3.x
13
 */
14
class WP3 extends Importers\AbstractSourceImporter
15
{
16
	protected $setting_file = '/wp-includes/version.php';
17
18
	public function getName()
19
	{
20
		return 'Wordpress 3.x';
21
	}
22
23
	public function getVersion()
24
	{
25
		return 'ElkArte 1.0';
26
	}
27
28
	public function getPrefix()
29
	{
30
		global $wp_prefix;
31
32
		return '`' . $this->getDbName() . '`.' . $wp_prefix;
33
	}
34
35
	public function getDbName()
36
	{
37
		global $wp_database;
38
39
		return $wp_database;
40
	}
41
42
	public function getTableTest()
43
	{
44
		return 'users';
45
	}
46
}
47