m11_ad_owner_data   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 15
c 1
b 0
f 0
dl 0
loc 32
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A update_data() 0 14 1
A depends_on() 0 5 1
1
<?php
2
/**
3
 *
4
 * Advertisement management. An extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2017 phpBB Limited <https://www.phpbb.com>
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace phpbb\ads\migrations\v10x;
12
13
class m11_ad_owner_data extends \phpbb\db\migration\migration
0 ignored issues
show
Bug introduced by
The type phpbb\db\migration\migration was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
14
{
15
	/**
16
	 * {@inheritDoc}
17
	 */
18
	public static function depends_on()
19
	{
20
		return array(
21
			'\phpbb\ads\migrations\v10x\m1_initial_schema',
22
			'\phpbb\ads\migrations\v10x\m10_ad_owner_schema',
23
		);
24
	}
25
26
	/**
27
	 * Add the UCP module and new permission
28
	 *
29
	 * @return array Array of data update instructions
30
	 */
31
	public function update_data()
32
	{
33
		return array(
34
			array('module.add', array(
35
				'ucp',
36
				'',
37
				'UCP_PHPBB_ADS_TITLE'
38
			)),
39
			array('module.add', array(
40
				'ucp',
41
				'UCP_PHPBB_ADS_TITLE',
42
				array(
43
					'module_basename' => '\phpbb\ads\ucp\main_module',
44
					'modes'           => array('stats'),
45
				),
46
			)),
47
		);
48
	}
49
}
50