Passed
Push — master ( 5c1b24...3c7f00 )
by Ismayil
15:08 queued 02:57
created

Seed::createGroup()   F

Complexity

Conditions 20
Paths > 20000

Size

Total Lines 106
Code Lines 60

Duplication

Lines 3
Ratio 2.83 %

Importance

Changes 0
Metric Value
cc 20
eloc 60
nc 26496
nop 2
dl 3
loc 106
rs 2
c 0
b 0
f 0

How to fix   Long Method    Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
namespace Elgg\Database\Seeds;
4
5
/**
6
 * Abstract seed
7
 *
8
 * Plugins should extend this class to create their own seeders,
9
 * add use 'seeds','database' plugin hook to add their seed to the sequence.
10
 */
11
abstract class Seed {
12
13
	use Seeding;
14
15
	/**
16
	 * Populate database
17
	 * @return mixed
18
	 */
19
	abstract function seed();
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
20
21
	/**
22
	 * Removed seeded rows from database
23
	 * @return mixed
24
	 */
25
	abstract function unseed();
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
26
27
}
28