Total Complexity | 4 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class PageSettingFactory extends Factory |
||
12 | { |
||
13 | /** |
||
14 | * The name of the factory's corresponding model. |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $model = PageSetting::class; |
||
19 | |||
20 | /** |
||
21 | * Define the model's default state. |
||
22 | * |
||
23 | * @return array |
||
24 | */ |
||
25 | 2 | public function definition() |
|
26 | { |
||
27 | 2 | return [ |
|
28 | 2 | 'type' => 'default', |
|
29 | 2 | 'page' => $this->faker->unique()->word(), |
|
30 | 2 | 'key' => $this->faker->unique()->word(), |
|
31 | 2 | 'value' => $this->faker->unique()->sentence(), |
|
32 | 2 | ]; |
|
33 | } |
||
34 | |||
35 | 2 | public function page(string $page) |
|
39 | 2 | ]); |
|
40 | } |
||
41 | |||
42 | 1 | public function key(string $key) |
|
43 | { |
||
44 | 1 | return $this->state([ |
|
45 | 1 | 'key' => $key, |
|
46 | 1 | ]); |
|
47 | } |
||
48 | |||
49 | 2 | public function setData(string $key, string $value) |
|
54 | 2 | ]); |
|
55 | } |
||
57 |