Completed
Push — aggregate_criterion ( ce4638...f5b574 )
by
unknown
17:48
created

CompositeCriterion::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 4
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
declare(strict_types=1);
8
9
namespace eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler;
10
11
use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
12
use eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler;
13
use eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriteriaConverter;
14
use eZ\Publish\Core\Persistence\Database\SelectQuery;
15
16
class CompositeCriterion extends CriterionHandler
17
{
18
    public function accept(Criterion $criterion): bool
19
    {
20
        return $criterion instanceof Criterion\CompositeCriterion;
21
    }
22
23
    public function handle(CriteriaConverter $converter, SelectQuery $query, Criterion $criterion, array $languageSettings)
24
    {
25
        return $converter->convertCriteria($query, $criterion->criteria, $languageSettings);
0 ignored issues
show
Bug introduced by
The property criteria does not seem to exist in eZ\Publish\API\Repositor...Content\Query\Criterion.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
26
    }
27
}
28