supportsSearchingContext()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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