alpha2   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 17
loc 17
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A depends_on() 7 7 1
A update_data() 6 6 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
/**
3
*
4
* @package Quick Title Edition Extension
5
* @copyright (c) 2015 ABDev
6
* @copyright (c) 2015 PastisD
7
* @copyright (c) 2015 Geolim4 <http://geolim4.com>
8
* @copyright (c) 2015 Zoddo <[email protected]>
9
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
10
*
11
*/
12
13
namespace ernadoo\qte\migrations\v200;
14
15 View Code Duplication
class alpha2 extends \phpbb\db\migration\migration
16
{
17
	static public function depends_on()
18
	{
19
		return array(
20
			'\ernadoo\qte\migrations\v200\alpha1',
21
			'\ernadoo\qte\migrations\v200\drop_columns',
22
		);
23
	}
24
25
	public function update_data()
26
	{
27
		return array(
28
			array('config.update', array('qte_version', '2.0.0-a2')),
29
		);
30
	}
31
}
32