Completed
Pull Request — master (#39)
by Matt
06:12
created

m3_plain_urls_config::depends_on()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 *
4
 * phpBB Media Embed PlugIn extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2018 phpBB Limited <https://www.phpbb.com>
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace phpbb\mediaembed\migrations;
12
13
/**
14
 * Migration 3: Add a config var for parsing plain urls
15
 */
16 View Code Duplication
class m3_plain_urls_config extends \phpbb\db\migration\migration
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...
17
{
18
	public function effectively_installed()
19
	{
20
		return $this->config->offsetExists('media_embed_parse_urls');
21
	}
22
23
	public static function depends_on()
24
	{
25
		return ['\phpbb\mediaembed\migrations\m1_install_data'];
26
	}
27
28
	public function update_data()
29
	{
30
		return [
31
			['config.add', ['media_embed_parse_urls', 1]],
32
		];
33
	}
34
}
35