Completed
Pull Request — master (#60)
by
unknown
02:33
created

m2_track_user_id   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 30
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A depends_on() 0 7 1
A update_data() 0 6 1
1
<?php
2
/**
3
*
4
* Google Analytics extension for the phpBB Forum Software package.
5
*
6
* @copyright (c) 2014 phpBB Limited <https://www.phpbb.com>
7
* @license GNU General Public License, version 2 (GPL-2.0)
8
*
9
*/
10
11
namespace phpbb\googleanalytics\migrations\v10x;
12
13
/**
14
* Migration stage 2: Add default config value for user id tracking
15
*/
16
class m2_track_user_id extends \phpbb\db\migration\migration
17
{
18
	/**
19
	* Assign migration file dependencies for this migration
20
	*
21
	* @return array Array of migration files
22
	* @static
23
	* @access public
24
	*/
25
	static public function depends_on()
26
	{
27
		return array(
28
			'\phpbb\db\migration\data\v310\gold',
29
			'\phpbb\googleanalytics\migrations\v10x\m1_initial_data'
30
		);
31
	}
32
33
	/**
34
	* Add Google Analytics data to the database.
35
	*
36
	* @return array Array of table data
37
	* @access public
38
	*/
39
	public function update_data()
40
	{
41
		return array(
42
			array('config.add', array('googleanalytics_track_user_id', 0)),
43
		);
44
	}
45
}
46