Passed
Push — master ( 592be2...9b0123 )
by Keoghan
34:12
created

SiteFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A definition() 0 9 1
1
<?php
2
3
namespace Database\Factories;
4
5
use App\Models\PhpVersion;
6
use App\Models\Site;
7
use Illuminate\Database\Eloquent\Factories\Factory;
8
9
class SiteFactory extends Factory
10
{
11
    /**
12
     * The name of the factory's corresponding model.
13
     *
14
     * @var string
15
     */
16
    protected $model = Site::class;
17
18
    /**
19
     * Define the model's default state.
20
     *
21
     * @return array
22
     */
23
    public function definition()
24
    {
25
        return [
26
            'name'           => $this->faker->word,
27
            'nginx_conf'     => 'default',
28
            'php_version_id' => function () {
29
                return PhpVersion::factory()->create()->id;
30
            },
31
            'secure' => false,
32
        ];
33
    }
34
}
35