PeriodicSentEntryFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 26
ccs 8
cts 8
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A group() 0 4 1
A definition() 0 5 1
1
<?php
2
3
namespace PeriodicNotice\Factories;
4
5
use Illuminate\Database\Eloquent\Factories\Factory;
6
use Illuminate\Database\Eloquent\Model;
7
use PeriodicNotice\Models\PeriodicSentEntry;
8
9
/**
10
 * @extends Factory<PeriodicSentEntry>
11
 */
12
class PeriodicSentEntryFactory extends Factory
13
{
14
    /**
15
     * The name of the factory's corresponding model.
16
     *
17
     * @var string
18
     */
19
    protected $model = PeriodicSentEntry::class;
20
21
    /**
22
     * Define the model's default state.
23
     *
24
     * @return array
25
     */
26 1
    public function definition()
27
    {
28 1
        return [
29 1
            'group'   => 'default',
30 1
            'sent_at' => $this->faker->dateTime(),
31 1
        ];
32
    }
33
34 1
    public function group(string $group = 'default')
35
    {
36 1
        return $this->state([
37 1
            'group' => $group,
38 1
        ]);
39
    }
40
}
41