TrackedChannelFactory::definition()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
nc 1
nop 0
dl 0
loc 7
c 0
b 0
f 0
cc 1
rs 10
1
<?php
2
3
namespace NotificationTracker\Database\Factories;
4
5
use Carbon\Carbon;
6
use Illuminate\Database\Eloquent\Factories\Factory;
7
use NotificationTracker\Models\TrackedChannel;
8
use NotificationTracker\Models\TrackedNotification;
9
10
class TrackedChannelFactory extends Factory
11
{
12
    protected $model = TrackedChannel::class;
13
14
    public function definition(): array
15
    {
16
        return [
17
            'notification_id' => TrackedNotification::factory(),
18
            'channel'         => 'mail',
19
            'route'           => serialize('[email protected]'),
20
            'sent_at'         => Carbon::now()->subDay(),
21
        ];
22
    }
23
}
24