Total Complexity | 2 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
9 | class TrackActionFactory extends Factory |
||
10 | { |
||
11 | use ModelChanges; |
||
12 | |||
13 | /** |
||
14 | * The name of the factory's corresponding model. |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $model = TrackAction::class; |
||
19 | |||
20 | /** |
||
21 | * Define the model's default state. |
||
22 | * |
||
23 | * @return array |
||
24 | */ |
||
25 | public function definition(): array |
||
26 | { |
||
27 | return [ |
||
28 | 'action' => $this->faker->randomElement($this->randomAction()), |
||
29 | 'model_table' => 'people', |
||
30 | 'model_key' => $this->faker->randomNumber(3), |
||
31 | 'model_changes' => $this->faker->randomElements($this->modelChanges()), |
||
32 | ]; |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Retrieve an array of 'actions' to be used as random elements. |
||
37 | * |
||
38 | * @return array |
||
39 | */ |
||
40 | protected function randomAction(): array |
||
45 | } |
||
46 | } |
||
47 |