Passed
Push — master ( 39e5a8...610dd1 )
by Yaroslav
03:43
created

MigrationHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 21
c 1
b 0
f 0
dl 0
loc 29
ccs 21
cts 21
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A geonamesDefaultColumns() 0 23 1
1
<?php
2
3
namespace LaraGeoData\Database;
4
5
use Illuminate\Database\Schema\Blueprint;
6
7
class MigrationHelper
8
{
9
10
    /**
11
     * @param Blueprint $table
12
     */
13 2
    public static function geonamesDefaultColumns(Blueprint $table): void
14
    {
15 2
        $table->unsignedInteger('geoname_id');
16 2
        $table->string('name', 200)->nullable()->index();
17 2
        $table->string('ascii_name', 200)->nullable()->index();
18 2
        $table->text('alternate_names')->nullable();
19 2
        $table->decimal('lat', 10, 7)->nullable()->index();
20 2
        $table->decimal('lng', 10, 7)->nullable()->index();
21 2
        $table->char('fclass', 1)->nullable()->index();
22 2
        $table->string('fcode', 10)->nullable()->index();
23 2
        $table->string('country', 2)->nullable()->index();
24 2
        $table->string('cc2', 200)->nullable()->index();
25 2
        $table->string('admin1', 20)->nullable()->index();
26 2
        $table->string('admin2', 80)->nullable()->index();
27 2
        $table->string('admin3', 20)->nullable()->index();
28 2
        $table->string('admin4', 20)->nullable()->index();
29 2
        $table->unsignedInteger('population')->nullable()->index();
30 2
        $table->integer('elevation')->nullable()->index();
31 2
        $table->integer('gtopo30')->nullable()->index();
32 2
        $table->string('timezone', 40)->nullable()->index();
33 2
        $table->dateTime('moddate')->nullable()->index();
34
35 2
        $table->primary('geoname_id');
36 2
    }
37
}
38