mas_0000_main   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A effectively_installed() 0 3 1
A update_data() 0 18 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-forever, Dark❶ [dark1]
7
 * @license GNU General Public License, version 2 (GPL-2.0-only)
8
 *
9
 */
10
11
namespace dark1\memberavatarstatus\migrations;
12
13
/**
14
 * @ignore
15
 */
16
use phpbb\db\migration\migration;
17
18
/**
19
 * Migration stage 0000 : Main
20
 */
21
class mas_0000_main extends migration
22
{
23
	public function effectively_installed()
24
	{
25
		return isset($this->config['dark1_mas']);
26
	}
27
28
	static public function depends_on()
29
	{
30
		return ['\phpbb\db\migration\data\v320\v320'];
31
	}
32
33
	public function update_data()
34
	{
35
		return [
36
			// Config Add
37
			['config.add', ['dark1_mas', 1]],
38
39
			// Module Add
40
			['module.add', [
41
				'acp',
42
				'ACP_CAT_DOT_MODS',
43
				'ACP_MAS_TITLE'
44
			]],
45
			['module.add', [
46
				'acp',
47
				'ACP_MAS_TITLE',
48
				[
49
					'module_basename'	=> '\dark1\memberavatarstatus\acp\main_module',
50
					'modes'				=> ['main'],
51
				],
52
			]],
53
		];
54
	}
55
}
56