AbstractODMCriteriaBuilder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

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\Doctrine;
5
6
use KGzocha\Searcher\Context\Doctrine\ODMBuilderSearchingContext;
7
use KGzocha\Searcher\Context\SearchingContextInterface;
8
use KGzocha\Searcher\CriteriaBuilder\CriteriaBuilderInterface;
9
10
/**
11
 * Abstract CriteriaBuilder that can be used in builders that supports
12
 * only ODMBuilderSearchingContext.
13
 *
14
 * @author Krzysztof Gzocha <[email protected]>
15
 * @author Daniel Ribeiro <[email protected]>
16
 */
17
abstract class AbstractODMCriteriaBuilder implements CriteriaBuilderInterface
18
{
19
    /**
20
     * @param SearchingContextInterface $searchingContext
21
     *
22
     * @return bool
23
     */
24 2
    public function supportsSearchingContext(
25
        SearchingContextInterface $searchingContext
26
    ): bool {
27 2
        return $searchingContext instanceof ODMBuilderSearchingContext;
28
    }
29
}
30