Completed
Push — 7.0_master_link_manager_merge ( e446e3 )
by André
77:34 queued 60:56
created

MatchNone   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A accept() 0 4 1
A handle() 0 4 1
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
namespace eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler;
8
9
use eZ\Publish\API\Repository\Values\URL\Query\Criterion;
10
use eZ\Publish\Core\Persistence\Legacy\URL\Query\CriteriaConverter;
11
use eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler;
12
use eZ\Publish\Core\Persistence\Database\SelectQuery;
13
14
class MatchNone implements CriterionHandler
15
{
16
    /**
17
     * {@inheritdoc}
18
     */
19
    public function accept(Criterion $criterion)
20
    {
21
        return $criterion instanceof Criterion\MatchNone;
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function handle(CriteriaConverter $converter, SelectQuery $query, Criterion $criterion)
28
    {
29
        return $query->expr->not($query->bindValue('1'));
30
    }
31
}
32