v333_m13_update_bbcodes::update_data()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
/**
3
*
4
* Advanced BBCode Box
5
*
6
* @copyright (c) 2021 Matt Friedman
7
* @license GNU General Public License, version 2 (GPL-2.0)
8
*
9
*/
10
11
namespace vse\abbc3\migrations;
12
13
class v333_m13_update_bbcodes extends bbcodes_migration_base
14
{
15
	/**
16
	 * {@inheritdoc}
17
	 */
18
	public static function depends_on()
19
	{
20
		return [
21
			'\vse\abbc3\migrations\v310_m4_install_data',
22
			'\vse\abbc3\migrations\v310_m5_update_bbcodes'];
23
	}
24
25
	/**
26
	 * {@inheritdoc}
27
	 */
28
	public function update_data()
29
	{
30
		return [
31
			['custom', [[$this, 'install_abbc3_bbcodes']]],
32
		];
33
	}
34
35
	/**
36
	 * {@inheritdoc}
37
	 */
38
	protected static $bbcode_data = [
39
		'sup' => [
40
			'bbcode_helpline'	=> 'ABBC3_SUP_HELPLINE',
41
			'bbcode_match'		=> '[sup]{TEXT}[/sup]',
42
			'bbcode_tpl'		=> '<sup>{TEXT}</sup>',
43
		],
44
		'sub' => [
45
			'bbcode_helpline'	=> 'ABBC3_SUB_HELPLINE',
46
			'bbcode_match'		=> '[sub]{TEXT}[/sub]',
47
			'bbcode_tpl'		=> '<sub>{TEXT}</sub>',
48
		],
49
	];
50
}
51