DateModified   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A accept() 0 4 1
A handle() 0 6 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
8
class DateModified extends SortClauseHandler
9
{
10
    public function accept(SortClause $sortClause)
11
    {
12
        return $sortClause instanceof SortClause\DateModified;
13
    }
14
15
    public function handle(SortClause $sortClause)
16
    {
17
        return [
18
            'modified' => $this->getDirection($sortClause),
19
        ];
20
    }
21
}
22