m1_init::update_data()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 12
rs 9.9666
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * phpBB Gallery - ACP CleanUp Extension
4
 *
5
 * @package   phpbbgallery/acpcleanup
6
 * @author    nickvergessen
7
 * @author    satanasov
8
 * @author    Leinad4Mind
9
 * @copyright 2007-2012 nickvergessen, 2014- satanasov, 2018- Leinad4Mind
10
 * @license   GPL-2.0-only
11
 */
12
13
namespace phpbbgallery\acpcleanup\migrations;
14
15
use 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...
16
17
class m1_init extends migration
18
{
19
	static public function depends_on()
20
	{
21
		return ['\phpbbgallery\core\migrations\release_1_2_0'];
22
	}
23
24
	public function update_data()
25
	{
26
		return [
27
				['permission.add', ['a_gallery_cleanup', true, 'a_board']],
28
				['module.add', [
29
					'acp',
30
					'PHPBB_GALLERY',
31
					[
32
						'module_basename' => '\phpbbgallery\acpcleanup\acp\main_module',
33
						'module_langname' => 'ACP_GALLERY_CLEANUP',
34
						'module_mode'     => 'cleanup',
35
						'module_auth'     => 'ext_phpbbgallery/acpcleanup && acl_a_gallery_cleanup',
36
					]
37
				]],
38
		];
39
	}
40
}
41