User::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 5
nc 1
nop 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