Passed
Push — master ( bc9a55...f3faba )
by Dark❶
07:56
created

unc_000_main   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A update_data() 0 18 1
A depends_on() 0 3 1
1
<?php
2
/**
3
 *
4
 * User Notification Control [UNC]. An extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2020, Dark❶, https://dark1.tech
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace dark1\usernotificationcontrol\migrations;
12
13
use phpbb\db\migration\migration;
14
15
class unc_000_main extends migration
16
{
17
	static public function depends_on()
18
	{
19
		return array('\phpbb\db\migration\data\v320\v320');
20
	}
21
22
	public function update_data()
23
	{
24
		return array(
25
			// Config
26
			array('config.add', array('dark1_unc_enable', 0)),
27
28
			// Module
29
			array('module.add', array(
30
				'acp',
31
				'ACP_CAT_DOT_MODS',
32
				'ACP_UNC_TITLE',
33
			)),
34
			array('module.add', array(
35
				'acp',
36
				'ACP_UNC_TITLE',
37
				array(
38
					'module_basename'	=> '\dark1\usernotificationcontrol\acp\main_module',
39
					'modes'				=> array('main'),
40
				),
41
			)),
42
		);
43
	}
44
}
45