mas_0002_viewonline   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A update_data() 0 16 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 0002 : Viewonline
20
 */
21
class mas_0002_viewonline extends migration
22
{
23
	static public function depends_on()
24
	{
25
		return ['\dark1\memberavatarstatus\migrations\mas_0001_memberlist'];
26
	}
27
28
	public function update_data()
29
	{
30
		return [
31
			// Config Add
32
			['config.add', ['dark1_mas_vo_pg_av', 0]],
33
			['config.add', ['dark1_mas_vo_pg_av_sz', 20]],
34
			['config.add', ['dark1_mas_vo_sb_av', 0]],
35
			['config.add', ['dark1_mas_vo_sb_av_sz', 20]],
36
37
			// Module Add
38
			['module.add', [
39
				'acp',
40
				'ACP_MAS_TITLE',
41
				[
42
					'module_basename'	=> '\dark1\memberavatarstatus\acp\viewonline_module',
43
					'modes'				=> ['viewonline'],
44
				],
45
			]],
46
		];
47
	}
48
}
49