Completed
Push — master ( 96e397...a65e1b )
by Dennis
03:31
created

User   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 100 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 9 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
namespace TildBJ\Seeder\Tests\Functional\Seeder;
3
4
use TildBJ\Seeder;
5
6
/**
7
 * Class User
8
 * @package TildBJ\Seeder\Tests\Functional\Seeder
9
 */
10
class User extends Seeder\Seeder\DatabaseSeeder
11
{
12
    /**
13
     * Run the database seeds.
14
     *
15
     * @return void
16
     */
17
    public function run()
18
    {
19
        $this->factory->create('fe_users', 2)->each(function (Seeder\Seed $seed, Seeder\Faker $faker) {
0 ignored issues
show
Unused Code introduced by
The parameter $faker is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
20
            $seed->set([
21
                'email' => '[email protected]',
22
                'usergroup' => $this->call(Group::class)
23
            ]);
24
        });
25
    }
26
}
27