Passed
Pull Request — master (#1)
by Dark❶
03:30
created

rsi_000_main   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A depends_on() 0 3 1
A effectively_installed() 0 3 1
A update_data() 0 11 1
1
<?php
2
/**
3
 *
4
 * Reduce Search Index [RSI]. 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\reducesearchindex\migrations;
12
13
use phpbb\db\migration\migration;
14
15
class rsi_000_main extends migration
16
{
17
	public function effectively_installed()
18
	{
19
		return isset($this->config['dark1_rsi']);
20
	}
21
22
	static public function depends_on()
23
	{
24
		return array('\phpbb\db\migration\data\v320\v320');
25
	}
26
27
	public function update_data()
28
	{
29
		return array(
30
			// Config
31
			array('config.add', array('dark1_rsi', 1)),
32
33
			// Module
34
			array('module.add', array(
35
				'acp',
36
				'ACP_CAT_DOT_MODS',
37
				'ACP_RSI_TITLE',
38
			)),
39
		);
40
	}
41
}
42