Code Duplication    Length = 30-30 lines in 2 locations

migrations/v10x/m13_hide_on_noncontent_pages.php 1 location

@@ 13-42 (lines=30) @@
10
11
namespace phpbb\ads\migrations\v10x;
12
13
class m13_hide_on_noncontent_pages extends \phpbb\db\migration\migration
14
{
15
	/**
16
	 * {@inheritDoc}
17
	 */
18
	public function effectively_installed()
19
	{
20
		return $this->config->offsetExists('phpbb_ads_hide_on_noncontent');
21
	}
22
23
	/**
24
	 * {@inheritDoc}
25
	 */
26
	public static function depends_on()
27
	{
28
		return array('\phpbb\ads\migrations\v10x\m1_initial_schema');
29
	}
30
31
	/**
32
	 * Add phpbb_ads_hide_on_noncontent config
33
	 *
34
	 * @return array Array of data update instructions
35
	 */
36
	public function update_data()
37
	{
38
		return array(
39
			array('config.add', array('phpbb_ads_hide_on_noncontent', 0)),
40
		);
41
	}
42
}
43

migrations/v10x/m7_adblocker.php 1 location

@@ 13-42 (lines=30) @@
10
11
namespace phpbb\ads\migrations\v10x;
12
13
class m7_adblocker extends \phpbb\db\migration\migration
14
{
15
	/**
16
	 * {@inheritDoc}
17
	 */
18
	public function effectively_installed()
19
	{
20
		return $this->config->offsetExists('phpbb_ads_adblocker_message');
21
	}
22
23
	/**
24
	 * {@inheritDoc}
25
	 */
26
	public static function depends_on()
27
	{
28
		return array('\phpbb\ads\migrations\v10x\m1_initial_schema');
29
	}
30
31
	/**
32
	 * Add phpbb_ads_adblocker_message config
33
	 *
34
	 * @return array Array of data update instructions
35
	 */
36
	public function update_data()
37
	{
38
		return array(
39
			array('config.add', array('phpbb_ads_adblocker_message', 0)),
40
		);
41
	}
42
}
43