ExportStoredFileFactory::definition()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace NovaResourceDynamicExport\Database\Factories;
4
5
use Illuminate\Database\Eloquent\Factories\Factory;
6
use NovaResourceDynamicExport\Models\ExportStoredFile;
7
8
class ExportStoredFileFactory extends Factory
9
{
10
    protected $model = ExportStoredFile::class;
11
12
    public function definition()
13
    {
14
        return [
15
            'type' => 'default',
16
            'disk' => $this->faker->word(),
17
            'path' => $this->faker->word(),
18
            'name' => $this->faker->word(),
19
            'meta' => [],
20
        ];
21
    }
22
23
    public function type(string $type): static
24
    {
25
        return $this->state([
26
            'type' => $type,
27
        ]);
28
    }
29
}
30