Completed
Push — master ( 965a67...27eb1e )
by Krzysztof
06:05 queued 03:13
created

supportsSearchingContext()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace KGzocha\Searcher\CriteriaBuilder\Elastica;
4
5
use KGzocha\Searcher\Context\Elastica\QuerySearchingContext;
6
use KGzocha\Searcher\Context\SearchingContextInterface;
7
use KGzocha\Searcher\CriteriaBuilder\CriteriaBuilderInterface;
8
9
/**
10
 * Extends this class in your CriteriaBuilder in order to use them
11
 * only for Elastica\QuerySearchingContext.
12
 *
13
 * @author Krzysztof Gzocha <[email protected]>
14
 */
15
abstract class AbstractQueryCriteriaBuilder implements CriteriaBuilderInterface
16
{
17
    /**
18
     * @inheritDoc
19
     */
20
    public function supportsSearchingContext(
21
        SearchingContextInterface $searchingContext
22
    ) {
23
        return $searchingContext instanceof QuerySearchingContext;
24
    }
25
26
}
27