Completed
Push — develop-3.2 ( 8cb13b...769a6a )
by Matt
33:56
created

v320_m8_update_bbcodes::update_data()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 6
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 6
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
/**
3
*
4
* Advanced BBCode Box
5
*
6
* @copyright (c) 2015 Matt Friedman
7
* @license GNU General Public License, version 2 (GPL-2.0)
8
*
9
*/
10
11
namespace vse\abbc3\migrations;
12
13 View Code Duplication
class v320_m8_update_bbcodes extends bbcodes_migration_base
1 ignored issue
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
{
15
	/**
16
	 * {@inheritdoc}
17
	 */
18
	static public function depends_on()
19
	{
20
		return array('\vse\abbc3\migrations\v310_m7_update_bbcodes');
21
	}
22
23
	/**
24
	 * {@inheritdoc}
25
	 */
26
	public function update_data()
27
	{
28
		return array(
29
			array('custom', array(array($this, 'install_abbc3_bbcodes'))),
30
		);
31
	}
32
33
	/**
34
	 * {@inheritdoc}
35
	 */
36
	protected static $bbcode_data = array(
37
		'align=center' => array(
38
			'bbcode_helpline'	=> 'ABBC3_ALIGN_HELPLINE',
39
			'bbcode_match'		=> '[align={IDENTIFIER}]{TEXT}[/align]',
40
			'bbcode_tpl'		=> '<div style="text-align:{IDENTIFIER};">{TEXT}</div>',
41
		),
42
	);
43
}
44