SolrRaw   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 15
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A accept() 0 4 1
A handle() 0 7 1
1
<?php
2
3
namespace Kaliop\EzFindSearchEngineBundle\Core\Persistence\eZFind\Content\Search\Common\Gateway\SortClauseHandler;
4
5
use eZ\Publish\API\Repository\Values\Content\Query\SortClause;
6
use Kaliop\EzFindSearchEngineBundle\Core\Persistence\eZFind\Content\Search\Common\Gateway\SortClauseHandler;
7
use Kaliop\EzFindSearchEngineBundle\API\Repository\Values\Content\Query\SortClause as KSortClause;
8
9
class SolrRaw extends SortClauseHandler
10
{
11
    public function accept(SortClause $sortClause)
12
    {
13
        return $sortClause instanceof KSortClause\SolrRaw;
14
    }
15
16
    public function handle(SortClause $sortClause)
17
    {
18
        $fieldIdentifier = $sortClause->target;
19
        return [
20
            $fieldIdentifier => $this->getDirection($sortClause),
21
        ];
22
    }
23
}
24