v335_m16_update_bbcodes::depends_on()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
/**
3
*
4
* Advanced BBCode Box
5
*
6
* @copyright (c) 2022 Matt Friedman
7
* @license GNU General Public License, version 2 (GPL-2.0)
8
*
9
*/
10
11
namespace vse\abbc3\migrations;
12
13
class v335_m16_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\v333_m15_google_fonts'];
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
		'font=' => [
40
			'bbcode_helpline'	=> 'ABBC3_FONT_HELPLINE',
41
			'bbcode_match'		=> '[font={INTTEXT}]{TEXT}[/font]',
42
			'bbcode_tpl'		=> '<span style="font-family: {INTTEXT}, sans-serif;">{TEXT}</span>',
43
		],
44
	];
45
}
46