Completed
Push — master ( b4fb45...fd4491 )
by dima
02:45
created

User::reset()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Core\Seeds;
4
5
/**
6
 * Description of User
7
 *
8
 * @author Dmitriy
9
 */
10
class User implements \Frameworkless\SeedInterface
11
{
12
13
	/**
14
	 * 
15
	 * @param type $id
16
	 * @return type
17
	 */
18
	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...
19
	{
20
		$generator = \Faker\Factory::create();
21
		$populator = new \Faker\ORM\Propel2\Populator($generator);
22
		$populator->addEntity(\Core\Models\User\User::class, $id);
23
		return $populator->execute();
24
	}
25
	
26
	/**
27
	 * 
28
	 * @return type
29
	 */
30
	public static function reset()
31
	{
32
		return \Core\Models\User\UserQuery::create()->deleteAll();
33
	}
34
35
}
36