install_1_2_0   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 20
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A update_data() 0 8 1
A effectively_installed() 0 3 1
A depends_on() 0 3 1
1
<?php
2
/**
3
 *
4
 * Database Optimize & Repair Tool
5
 *
6
 * @copyright (c) 2013, 2019 Matt Friedman
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace vse\dbtool\migrations;
12
13
class install_1_2_0 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
	public function effectively_installed()
16
	{
17
		return $this->config->offsetExists('dbtool_lock');
18
	}
19
20
	public static function depends_on()
21
	{
22
		return ['\vse\dbtool\migrations\install_1_1_0'];
23
	}
24
25
	public function update_data()
26
	{
27
		return [
28
			['config.add', ['dbtool_lock', 0, true]],
29
30
			['if', [
31
				$this->config->offsetExists('dbtool_version'),
32
				['config.remove', ['dbtool_version']],
33
			]],
34
		];
35
	}
36
}
37