Failed Conditions
Pull Request — experimental/sf (#3236)
by Kentaro
144:19 queued 116:23
created

AdminCustomerCustomizer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Plugin\QueryCustomize\Entity;
15
16
use Eccube\Doctrine\Query\WhereClause;
17
use Eccube\Doctrine\Query\WhereCustomizer;
18
use Eccube\Repository\QueryKey;
19
20
class AdminCustomerCustomizer extends WhereCustomizer
21
{
22
    /**
23
     * 1回以上購入している会員を抽出
24
     *
25
     * @param array $params
26
     * @param $queryKey
27
     *
28
     * @return WhereClause[]
29
     */
30
    protected function createStatements($params, $queryKey)
31
    {
32
        // travis-ciのテストが通らないため、コメントアウト
33
        // 試してみるにはコメントアウトを解除してください.
34
        //return [WhereClause::gte('c.buy_times', ':buy_times', ['buy_times' => 1])];
35
36
        return [];
37
    }
38
39
    /**
40
     * カスタマイズ対象のキーを返します。
41
     *
42
     * @return string
43
     */
44
    public function getQueryKey()
45
    {
46
        return QueryKey::CUSTOMER_SEARCH;
47
    }
48
}
49