Passed
Pull Request — master (#159)
by Matt
01:32
created

m14_notification_data   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A effectively_installed() 0 3 1
A update_data() 0 4 1
A depends_on() 0 5 1
1
<?php
2
/**
3
 *
4
 * Ideas extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) phpBB Limited <https://www.phpbb.com>
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace phpbb\ideas\migrations;
12
13
class m14_notification_data extends \phpbb\db\migration\migration
14
{
15
	public function effectively_installed()
16
	{
17
		return $this->config->offsetExists('ideas_status_notifications_id');
18
	}
19
20
	public static function depends_on()
21
	{
22
		return [
23
			'\phpbb\ideas\migrations\m1_initial_schema',
24
			'\phpbb\ideas\migrations\m13_set_permissions'
25
		];
26
	}
27
28
	public function update_data()
29
	{
30
		return [
31
			['config.add', ['ideas_status_notifications_id', 0, true]],
32
		];
33
	}
34
}
35