Passed
Push — master ( 05ca27...633235 )
by Aimeos
03:28
created

TablesMigrateSiteidLaravel   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 40
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A migrate() 0 5 1
A getPreDependencies() 0 3 1
A getPostDependencies() 0 3 1
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2019
6
 */
7
8
9
namespace Aimeos\MW\Setup\Task;
10
11
12
/**
13
 * Updates site ID columns
14
 */
15
class TablesMigrateSiteidLaravel extends TablesMigrateSiteid
16
{
17
	private $resources = [
18
		'db-customer' => [
19
			'users_list_type', 'users_property_type',
20
			'users_property', 'users_list', 'users_address', 'users',
21
		],
22
	];
23
24
25
	/**
26
	 * Returns the list of task names which this task depends on.
27
	 *
28
	 * @return string[] List of task names
29
	 */
30
	public function getPreDependencies() : array
31
	{
32
		return ['TablesMigrateSiteid'];
33
	}
34
35
36
	/**
37
	 * Returns the list of task names which this task depends on.
38
	 *
39
	 * @return string[] List of task names
40
	 */
41
	public function getPostDependencies() : array
42
	{
43
		return ['TablesCreateMShop'];
44
	}
45
46
47
	/**
48
	 * Executes the task
49
	 */
50
	public function migrate()
51
	{
52
		$this->msg( 'Update Laravel "siteid" columns', 0, '' );
53
54
		$this->process( $this->resources );
55
	}
56
}
57