Completed
Push — master ( 3768ac...6b4e3f )
by Gabriel
03:57
created

SeoOptions::setRoutePrefix()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Giuga\LaravelSeoMetaBox\Traits;
4
5
class SeoOptions
6
{
7
    public bool $hasSlug = false;
8
    public string $slugField;
9
    public string $routePrefix;
10
11
    public static function create(): self
12
    {
13
        return new static();
14
    }
15
16
    public function setSlugField(string $field): self
17
    {
18
        $this->hasSlug = true;
19
        $this->slugField = $field;
20
21
        return $this;
22
    }
23
24
    public function setRoutePrefix(string $prefix): self
25
    {
26
        $this->routePrefix = $prefix;
27
28
        return $this;
29
    }
30
}
31