PersonEventFactory::definition()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 16
nc 1
nop 0
dl 0
loc 18
rs 9.7333
c 0
b 0
f 0
1
<?php
2
3
namespace Database\Factories;
4
5
use App\Models\Person;
0 ignored issues
show
Bug introduced by
The type App\Models\Person was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use App\Models\PersonEvent;
0 ignored issues
show
Bug introduced by
The type App\Models\PersonEvent was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use App\Models\Place;
0 ignored issues
show
Bug introduced by
The type App\Models\Place was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Illuminate\Database\Eloquent\Factories\Factory;
0 ignored issues
show
Bug introduced by
The type Illuminate\Database\Eloquent\Factories\Factory was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
10
class PersonEventFactory extends Factory
11
{
12
    /**
13
     * The name of the factory's corresponding model.
14
     *
15
     * @var string
16
     */
17
    protected $model = PersonEvent::class;
18
19
    /**
20
     * Define the model's default state.
21
     *
22
     * @return array
23
     */
24
    public function definition()
25
    {
26
        return [
27
            'person_id'   => Person::factory(),
28
            'title'       => $this->faker->jobTitle(),
29
            'type'        => $this->faker->jobTitle(),
30
            'attr'        => $this->faker->text(),
31
            'date'        => $this->faker->date(),
32
            'plac'        => $this->faker->address(),
33
            'phon'        => $this->faker->phoneNumber(),
34
            'caus'        => $this->faker->text(),
35
            'age'         => $this->faker->randomNumber(50),
36
            'agnc'        => $this->faker->word(),
37
            'places_id'   => Place::factory(),
38
            'description' => $this->faker->text(),
39
            'year'        => $this->faker->year(),
40
            'month'       => $this->faker->month(),
41
            'day'         => $this->faker->dayOfMonth(),
42
        ];
43
    }
44
}
45