Failed Conditions
Pull Request — experimental/3.1 (#2285)
by Kiyotaka
41:31
created

WhereCustomizer::customize()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 3
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
4
namespace Eccube\Doctrine\Query;
5
6
7
use Doctrine\ORM\QueryBuilder;
8
9
abstract class WhereCustomizer implements QueryCustomizer
0 ignored issues
show
introduced by
Abstract class name is not prefixed with "Abstract"
Loading history...
introduced by
Missing class doc comment
Loading history...
10
{
11
12
    /**
13
     * @param QueryBuilder $builder
14
     * @param array $params
0 ignored issues
show
introduced by
Expected 8 spaces after parameter type; 1 found
Loading history...
15
     * @param string $queryKey
0 ignored issues
show
introduced by
Expected 7 spaces after parameter type; 1 found
Loading history...
16
     */
17
    public final function customize(QueryBuilder $builder, $params, $queryKey)
0 ignored issues
show
Coding Style introduced by
As per PSR2, final should precede the visibility keyword.
Loading history...
18
    {
19
        foreach ($this->createStatements($params, $queryKey) as $whereClause) {
20
            $whereClause->build($builder);
21
        }
22
    }
23
24
    /**
25
     * @param array $params
26
     * @param $queryKey
27
     * @return WhereClause[]
28
     */
29
    protected abstract function createStatements($params, $queryKey);
0 ignored issues
show
Coding Style introduced by
The abstract declaration must precede the visibility declaration
Loading history...
30
}