Passed
Push — main ( 36d675...acbe54 )
by Michael
03:00
created

SeoTag::getUrlColumnName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace MichaelRubel\SeoManager\Models;
4
5
use Illuminate\Database\Eloquent\Casts\AsCollection;
6
use Illuminate\Database\Eloquent\Factories\HasFactory;
7
use Illuminate\Database\Eloquent\Model;
8
9
class SeoTag extends Model
10
{
11
    use HasFactory;
12
13
    /**
14
     * The attributes that aren't mass assignable.
15
     *
16
     * @var array<string>|bool
17
     */
18
    protected $guarded = [];
19
20
    /**
21
     * The attributes that should be cast.
22
     *
23
     * @var array
24
     */
25
    protected $casts = [
26
        'tags' => AsCollection::class,
27
    ];
28
29
    /**
30
     * @return string
31
     */
32 5
    public function getUrlColumnName(): string
33
    {
34 5
        return 'url';
35
    }
36
37
    /**
38
     * @return string
39
     */
40 5
    public function getTagsColumnName(): string
41
    {
42 5
        return 'tags';
43
    }
44
}
45