Completed
Push — develop-stable ( 9a1552...60e8a8 )
by Paul
09:56
created

release_104   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 1
dl 18
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A depends_on() 8 8 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
 * Ajax Shoutbox extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2014 Paul Sohier <http://www.ajax-shoutbox.com>
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
namespace paul999\ajaxshoutbox\migrations;
11
12
use phpbb\db\migration\migration;
13
14 View Code Duplication
class release_104 extends migration
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
15
{
16
	static public function depends_on()
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
17
	{
18
		return array(
19
			'\paul999\ajaxshoutbox\migrations\remove_push_config',
20
			'\paul999\ajaxshoutbox\migrations\release_102',
21
			'\phpbb\db\migration\data\v310\gold',
22
		);
23
	}
24
25
	public function update_data()
26
	{
27
		return array(
28
			array('config.update', array('ajaxshoutbox_version', '1.0.4'))
29
		);
30
	}
31
}
32