Step1BaseImporter   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A fixTexts() 0 3 1
A beforeSql() 0 5 2
A doSpecialTable() 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
namespace Importers;
11
12
/**
13
 * The starting point for the first step of any importer.
14
 * Step 1 is where the actual conversion happens, where the data are moved
15
 * from the source system to the destination one.
16
 * It's the only step that <b>shall</s> know about both the systems.
17
 */
18
abstract class Step1BaseImporter extends BaseImporter
19
{
20
	public function beforeSql($method)
21
	{
22
		if (method_exists($this, $method))
23
		{
24
			$this->$method();
25
		}
26
	}
27
28
	public function doSpecialTable($table, $params = null)
29
	{
30
		return $params;
31
	}
32
33
	public function fixTexts($row)
34
	{
35
		return $row;
36
	}
37
}
38