# give/4.16.9/src/EventTickets/Factories/EventFactory.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.9. 28 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.9/code/src/EventTickets/Factories/EventFactory.php
- Raw: https://pluginprobe.com/plugins/give/4.16.9/raw/src/EventTickets/Factories/EventFactory.php
- Modified: 2024-03-13T21:54:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.9/code/src/EventTickets/Factories/EventFactory.php#L10-L20`.

```php
<?php

namespace Give\EventTickets\Factories;

use DateTime;
use Give\Framework\Models\Factories\ModelFactory;

class EventFactory extends ModelFactory
{
    /**
     * @since 3.6.0
     */
    public function definition(): array
    {
        $startDateTime = $this->faker->dateTimeThisYear('+6 months');

        return [
            'title' => $this->faker->words(3, true),
            'description' => $this->faker->paragraph(),
            'startDateTime' => $startDateTime,
            'endDateTime' => $startDateTime->modify('+1 hour'),
            'ticketCloseDateTime' => null,
            'createdAt' => new DateTime(),
            'updatedAt' => new DateTime(),
        ];
    }
}

```
