Passed
Branch master (e751cb)
by Matt
02:48
created

v323_m12_table_bbcode   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A revert_data() 0 4 1
A update_data() 0 4 1
A depends_on() 0 5 1
1
<?php
2
/**
3
*
4
* Advanced BBCode Box
5
*
6
* @copyright (c) 2018 Matt Friedman
7
* @license GNU General Public License, version 2 (GPL-2.0)
8
*
9
*/
10
11
namespace vse\abbc3\migrations;
12
13
class v323_m12_table_bbcode extends bbcodes_migration_base
14
{
15
	/**
16
	 * {@inheritdoc}
17
	 */
18
	public static function depends_on()
19
	{
20
		return array(
21
			'\vse\abbc3\migrations\v310_m4_install_data',
22
			'\vse\abbc3\migrations\v322_m11_reparse',
23
		);
24
	}
25
26
	/**
27
	 * {@inheritdoc}
28
	 */
29
	public function update_data()
30
	{
31
		return array(
32
			array('custom', array(array($this, 'install_abbc3_bbcodes'))),
33
		);
34
	}
35
36
	public function revert_data()
37
	{
38
		return array(
39
			array('custom', array(array($this, 'delete_abbc3_bbcodes'))),
40
		);
41
	}
42
43
	/**
44
	 * {@inheritdoc}
45
	 */
46
	protected static $bbcode_data = array(
47
		'pipes' => array(
48
			'bbcode_helpline'	=> 'ABBC3_PIPE_TABLES',
49
			'bbcode_match'		=> '[pipes]{TEXT}[/pipes]',
50
			'bbcode_tpl'		=> '{TEXT}',
51
			'bbcode_order'		=> 999,
52
		),
53
	);
54
}
55