Passed
Branch master (993dd4)
by Dark❶
03:40
created

mas_0000_main   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A effectively_installed() 0 3 1
A update_data() 0 20 1
A depends_on() 0 3 1
1
<?php
2
/**
3
 *
4
 * Member Avatar & Status [MAS]. An extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2018-2020, Dark❶ [dark1]
7
 * @license GNU General Public License, version 2 (GPL-2.0-only)
8
 *
9
 */
10
11
namespace dark1\memberavatarstatus\migrations;
12
13
class mas_0000_main extends \phpbb\db\migration\migration
14
{
15
	public function effectively_installed()
16
	{
17
		return isset($this->config['dark1_mas']);
18
	}
19
20
	static public function depends_on()
21
	{
22
		return array('\phpbb\db\migration\data\v320\v320');
23
	}
24
25
	public function update_data()
26
	{
27
		return array(
28
			// Config Add
29
			array('config.add', array('dark1_mas', 1)),
30
31
			// Module Add
32
			array('module.add', array(
33
				'acp',
34
				'ACP_CAT_DOT_MODS',
35
				'ACP_MAS_TITLE'
36
			)),
37
			array('module.add', array(
38
				'acp',
39
				'ACP_MAS_TITLE',
40
				array(
41
					'module_basename'	=> '\dark1\memberavatarstatus\acp\main_module',
42
					'module_langname'	=> 'ACP_MAS_MODE_MAIN',
43
					'module_mode'		=> 'main',
44
					'module_auth'		=> 'ext_dark1/memberavatarstatus && acl_a_board',
45
				),
46
			)),
47
		);
48
	}
49
}
50