ExportStoredFileFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 10
c 1
b 0
f 0
dl 0
loc 19
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A type() 0 4 1
A definition() 0 8 1
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