unc_000_main   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 13
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-forever, 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
/**
14
 * @ignore
15
 */
16
use phpbb\db\migration\migration;
17
18
/**
19
 * Migration stage 000 : Main
20
 */
21
class unc_000_main extends migration
22
{
23
	static public function depends_on()
24
	{
25
		return ['\phpbb\db\migration\data\v320\v320'];
26
	}
27
28
	public function update_data()
29
	{
30
		return [
31
			// Config
32
			['config.add', ['dark1_unc_enable', 0]],
33
34
			// Module
35
			['module.add', [
36
				'acp',
37
				'ACP_CAT_DOT_MODS',
38
				'ACP_UNC_TITLE',
39
			]],
40
			['module.add', [
41
				'acp',
42
				'ACP_UNC_TITLE',
43
				[
44
					'module_basename'	=> '\dark1\usernotificationcontrol\acp\main_module',
45
					'modes'				=> ['main'],
46
				],
47
			]],
48
		];
49
	}
50
}
51