initial_module   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 43
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B update_data() 0 40 1
1
<?php
2
/**
3
*
4
* @package phpBB Extension - tas2580 Social Media Buttons
5
* @copyright (c) 2015 tas2580 (https://tas2580.net)
6
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
7
*
8
*/
9
10
namespace tas2580\socialbuttons\migrations;
11
12
class initial_module extends \phpbb\db\migration\migration
13
{
14
	public function update_data()
15
	{
16
		return array(
17
			// Add configs
18
			array('config.add', array('socialbuttons_style', '1')),
19
			array('config.add', array('socialbuttons_multiplicator', '3600')),
20
			array('config.add', array('socialbuttons_cachetime', '24')),
21
			array('config.add', array('socialbuttons_position', '2')),
22
			array('config.add', array('socialbuttons_facebook', '1')),
23
			array('config.add', array('socialbuttons_twitter', '1')),
24
			array('config.add', array('socialbuttons_google', '1')),
25
			array('config.add', array('socialbuttons_linkedin', '1')),
26
			array('config.add', array('socialbuttons_showshares', '1')),
27
			array('config.add', array('socialbuttons_enable_og', '1')),
28
			array('config.add', array('socialbuttons_og_image', '')),
29
			array('config.add', array('socialbuttons_enable_og_title', '1')),
30
			array('config.add', array('socialbuttons_enable_og_desc', '1')),
31
			array('config.add', array('socialbuttons_enable_og_desc_forums', '')),
32
			array('config.add', array('socialbuttons_use_seo_urls', '0')),
33
			array('config.add', array('socialbuttons_enable_forums', '')),
34
			array('config.add', array('socialbuttons_enable', '')),
35
			// Keep track of version in the database
36
			array('config.add', array('socialbuttons_version', '1.0.0-RC1')),
37
38
			// Add ACP module
39
			array('module.add', array(
40
				'acp',
41
				'ACP_CAT_DOT_MODS',
42
				'ACP_SOCIALBUTTONS_TITLE'
43
			)),
44
			array('module.add', array(
45
				'acp',
46
				'ACP_SOCIALBUTTONS_TITLE',
47
				array(
48
					'module_basename'	=> '\tas2580\socialbuttons\acp\socialbuttons_module',
49
					'modes'				=> array('settings'),
50
				),
51
			)),
52
		);
53
	}
54
}
55