Passed
Push — master ( 78e574...429ad5 )
by Jakub
03:25
created

m2_configs::update_data()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * Akismet notification type migrations.
4
 *
5
 * @package phpBB Extension - Gothick Akismet
6
 * @copyright (c) 2017 Matt Gibson Creative Ltd.
7
 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
8
 *
9
 */
10
namespace senky\akismet\migrations\v10x;
11
12
class m2_configs extends \phpbb\db\migration\migration
13
{
14
	/**
15
	 * {@inheritDoc}
16
	 */
17
	public function effectively_installed()
18
	{
19
		return $this->config->offsetExists('senky_akismet_api_key');
20
	}
21
22
	/**
23
	 * {@inheritDoc}
24
	 */
25
	static public function depends_on()
26
	{
27
		return array('\senky\akismet\migrations\v10x\m1_acp_module');
28
	}
29
30
	/**
31
	 * {@inheritDoc}
32
	 */
33
	public function update_data()
34
	{
35
		return array(
36
			array('config.add', array('senky_akismet_api_key', '')),
37
			array('config.add', array('senky_akismet_check_registrations', 0)),
38
			array('config.add', array('senky_akismet_add_registering_spammers_to_group', 0)),
39
			array('config.add', array('senky_akismet_add_registering_blatant_spammers_to_group', 0)),
40
			array('config.add', array('senky_akismet_skip_check_after_n_posts', 0)),
41
		);
42
	}
43
}
44