AbstractQueryCriteriaBuilder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 11
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A supportsSearchingContext() 0 5 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