GeoTownFactory::definition()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 13
ccs 0
cts 10
cp 0
rs 9.9
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace UKTowns\Models;
4
5
use Illuminate\Database\Eloquent\Factories\Factory;
6
7
class GeoTownFactory extends Factory
8
{
9
    protected $model = GeoTown::class;
10
11
    public function definition()
12
    {
13
        return [
14
            'place_name'     => $this->faker->city(),
15
            'county'         => $this->faker->city(),
16
            'country'        => $this->faker->city(),
17
            'grid_reference' => $this->faker->word(),
18
            'easting'        => random_int(0, 999),
19
            'northing'       => random_int(0, 999),
20
            'latitude'       => $this->faker->latitude(),
21
            'longitude'      => $this->faker->longitude(),
22
            'postcode_area'  => $this->faker->postcode(),
23
            'type'           => 'Other',
24
        ];
25
    }
26
}
27