PostalCode   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 7
c 1
b 0
f 0
dl 0
loc 17
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getTableNameRoot() 0 3 1
1
<?php
2
3
namespace LaraGeoData\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class PostalCode extends Model
8
{
9
    use HasTableWithSuffix, HasCoordinates, HasLocationName;
0 ignored issues
show
introduced by
The trait LaraGeoData\Models\HasCoordinates requires some properties which are not provided by LaraGeoData\Models\PostalCode: $longitudeColumnName, $distanceColumnName, $distance, $latitudeColumnName
Loading history...
10
11
    protected $primaryKey = 'postal_code';
12
    public $incrementing  = false;
13
14
    protected $guarded = [];
15
16
    protected string $locationNameColumn = 'postal_code';
17
18
    /**
19
     * @inheritDoc
20
     */
21 2
    public function getTableNameRoot(): string
22
    {
23 2
        return config('geonames.database.tables.postalcodes');
24
    }
25
}
26