| Total Complexity | 5 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class FormEntryFactory extends Factory |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * The name of the factory's corresponding model. |
||
| 15 | * |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | protected $model = FormEntry::class; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Define the model's default state. |
||
| 22 | * |
||
| 23 | * @return array |
||
| 24 | */ |
||
| 25 | public function definition() |
||
| 35 | ]; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function type(?string $type): static |
||
| 42 | ]); |
||
| 43 | } |
||
| 44 | |||
| 45 | public function notified(?\DateTimeInterface $dateTime): static |
||
| 46 | { |
||
| 47 | return $this->state([ |
||
| 48 | 'notified_at' => $dateTime ?? Carbon::now(), |
||
| 49 | ]); |
||
| 50 | } |
||
| 51 | |||
| 52 | public function notNotified(): static |
||
| 53 | { |
||
| 54 | return $this->state([ |
||
| 55 | 'notified_at' => null, |
||
| 56 | ]); |
||
| 57 | } |
||
| 58 | |||
| 59 | public function usingContent(FormContent $formContent): static |
||
| 64 | ]); |
||
| 65 | } |
||
| 66 | } |
||
| 67 |