User   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 6 1
A reset() 0 3 1
1
<?php
2
namespace Core\Seeds;
3
4
/**
5
 * Description of User
6
 *
7
 * @author Dmitriy
8
 */
9
class User implements \Frameworkless\SeedInterface{
10
11
    /**
12
     * 
13
     * @param type $id
14
     * @return type
15
     */
16
    static public function build($id = 1){
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
17
	$generator	 = \Faker\Factory::create();
18
	$populator	 = new \Faker\ORM\Propel2\Populator($generator);
19
	$populator->addEntity(\Core\Models\User\User::class, $id);
20
	return $populator->execute();
21
    }
22
23
    /**
24
     * 
25
     * @return type
26
     */
27
    public static function reset(){
28
	return \Core\Models\User\UserQuery::create()->deleteAll();
29
    }
30
}
31