Completed
Push — master ( e4e7c1...84e0d1 )
by Freek
01:15
created

SearchResult::setResult()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Spatie\Searchable;
4
5
class SearchResult
6
{
7
    /** @var \Spatie\Searchable\Searchable */
8
    public $searchable;
9
10
    /** @var string */
11
    public $title;
12
13
    /** @var null|string */
14
    public $url;
15
16
    /** @var string */
17
    public $type;
18
19
    public function __construct(Searchable $searchable, string $title, ?string $url = null)
20
    {
21
        $this->searchable = $searchable;
22
23
        $this->title = $title;
24
25
        $this->url = $url;
26
    }
27
28
    public function setType(string $type): self
29
    {
30
        $this->type = $type;
31
32
        return $this;
33
    }
34
}
35