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

AbstractQueryCriteriaBuilder   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 12
rs 10

1 Method

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