RepositoryFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A definition() 0 15 1
1
<?php
2
3
namespace Database\Factories;
4
5
use App\Models\Addr;
0 ignored issues
show
Bug introduced by
The type App\Models\Addr 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\Repository;
0 ignored issues
show
Bug introduced by
The type App\Models\Repository 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\Type;
0 ignored issues
show
Bug introduced by
The type App\Models\Type 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 RepositoryFactory extends Factory
11
{
12
    /**
13
     * The name of the factory's corresponding model.
14
     *
15
     * @var string
16
     */
17
    protected $model = Repository::class;
18
19
    /**
20
     * Define the model's default state.
21
     *
22
     * @return array
23
     */
24
    public function definition()
25
    {
26
        return [
27
            'repo'    => $this->faker->word(),
28
            'name'    => $this->faker->word(),
29
            'addr_id' => Addr::factory(),
30
            'rin'     => $this->faker->word(),
31
            'phon'    => $this->faker->phoneNumber(),
32
            'email'   => $this->faker->email(),
33
            'fax',
34
            'www'         => $this->faker->url(),
35
            'name'        => $this->faker->name(),
36
            'description' => $this->faker->text(),
37
            'type_id'     => Type::factory(),
38
            'is_active',
39
        ];
40
    }
41
}
42