Passed
Pull Request — master (#69)
by Manuele
04:16
created

Search   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 48
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getBox() 0 3 1
A setFacets() 0 3 1
A getFacets() 0 3 1
A setBox() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace BitBag\SyliusElasticsearchPlugin\Model;
5
6
class Search
7
{
8
    /**
9
     * @var SearchBox|null
10
     */
11
    private $box;
12
13
    /**
14
     * @var SearchFacets|null
15
     */
16
    private $facets;
17
18
    public function __construct()
19
    {
20
        $this->box = new SearchBox();
21
        $this->facets = new SearchFacets();
22
    }
23
24
    /**
25
     * @return SearchBox|null
26
     */
27
    public function getBox(): ?SearchBox
28
    {
29
        return $this->box;
30
    }
31
32
    /**
33
     * @param SearchBox|null $box
34
     */
35
    public function setBox(?SearchBox $box): void
36
    {
37
        $this->box = $box;
38
    }
39
40
    /**
41
     * @return SearchFacets|null
42
     */
43
    public function getFacets(): ?SearchFacets
44
    {
45
        return $this->facets;
46
    }
47
48
    /**
49
     * @param SearchFacets|null $facets
50
     */
51
    public function setFacets(?SearchFacets $facets): void
52
    {
53
        $this->facets = $facets;
54
    }
55
}
56