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

MatchNone::accept()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
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