Completed
Push — master ( cdd593...deaa6d )
by Krzysztof
18s queued 13s
created

WrappedResultsSearcher::search()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
crap 1
1
<?php
2
3
namespace KGzocha\Searcher;
4
5
use KGzocha\Searcher\FilterModel\Collection\FilterModelCollectionInterface;
6
use KGzocha\Searcher\Result\ResultCollection;
7
8
/**
9
 * @author Krzysztof Gzocha <[email protected]>
10
 */
11
class WrappedResultsSearcher implements SearcherInterface
12
{
13
    /**
14
     * @var SearcherInterface
15
     */
16
    private $searcher;
17
18
    /**
19
     * @param SearcherInterface $searcher
20
     */
21 4
    public function __construct(SearcherInterface $searcher)
22
    {
23 4
        $this->searcher = $searcher;
24 4
    }
25
26
    /**
27
     * @inheritDoc
28
     */
29 4
    public function search(
30
        FilterModelCollectionInterface $filterCollection
31
    ) {
32 4
        return new ResultCollection(
33 4
            $this->searcher->search($filterCollection)
34
        );
35
    }
36
}
37