Failed Conditions
Pull Request — experimental/3.1 (#2532)
by Kentaro
34:08 queued 17:05
created

OrderService::setCustomerUpdate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 3
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 2
cp 0
crap 2
1
<?php
2
/*
3
 * This file is part of EC-CUBE
4
 *
5
 * Copyright(c) 2000-2015 LOCKON CO.,LTD. All Rights Reserved.
6
 *
7
 * http://www.lockon.co.jp/
8
 *
9
 * This program is free software; you can redistribute it and/or
10
 * modify it under the terms of the GNU General Public License
11
 * as published by the Free Software Foundation; either version 2
12
 * of the License, or (at your option) any later version.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 * GNU General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU General Public License
20
 * along with this program; if not, write to the Free Software
21
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22
 */
23
24
namespace Eccube\Service;
25
26
use Eccube\Annotation\Inject;
27
use Eccube\Annotation\Service;
28
use Eccube\Entity\Cart;
29
use Eccube\Entity\Customer;
30
use Eccube\Entity\Order;
31
32
/**
33
 * @deprecated since 3.0.0, to be removed in 3.1
34
 * @Service
35
 */
36
class OrderService
37
{
38
    /**
39
     * @Inject(ShoppingService::class)
40
     * @var ShoppingService
41
     */
42
    protected $shoppingService;
43
44
45
    /**
46
     * 商品種別を取得
47
     *
48
     * @param Order $Order
49
     * @return array
50
     * @deprecated since 3.0.0, to be removed in 3.1
51
     */
52 1
    public function getProductTypes(Order $Order)
53
    {
54 1
        return $Order->getProductTypes();
55
    }
56
57
    /**
58
     * 下位互換用関数
59
     *
60
     * @return Order
61
     *
62
     * @see ShoppingService::newOrder()
63
     *
64
     * @deprecated since 3.0.0, to be removed in 3.1
65
     */
66
    public function newOrder()
67
    {
68
        return $this->shoppingService->newOrder();
69
    }
70
71
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$cartItems" missing
Loading history...
introduced by
Doc comment for parameter "$preOrderId" missing
Loading history...
72
     * 下位互換用関数
73
     *
74
     * @param $cartItems
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
75
     * @param Customer|null $Customer
76
     * @param $preOrderId
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
77
     * @return Order
78
     *
79
     * @see ShoppingService::createOrder()
80
     *
81
     * @deprecated since 3.0.0, to be removed in 3.1
82
     */
83
    public function registerPreOrderFromCartItems($cartItems, Customer $Customer = null, $preOrderId)
0 ignored issues
show
Unused Code introduced by
The parameter $cartItems is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $preOrderId is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Coding Style introduced by
Parameters which have default values should be placed at the end.

If you place a parameter with a default value before a parameter with a default value, the default value of the first parameter will never be used as it will always need to be passed anyway:

// $a must always be passed; it's default value is never used.
function someFunction($a = 5, $b) { }
Loading history...
84
    {
85
        return $this->shoppingService->createOrder($Customer);
86
    }
87
88
    /**
89
     * 下位互換用関数
90
     *
91
     * @param Order $Order
92
     * @param Cart $Cart
0 ignored issues
show
introduced by
Expected 2 spaces after parameter type; 1 found
Loading history...
93
     * @return Order
94
     *
95
     * @see ShoppingService::getAmount()
96
     *
97
     * @deprecated since 3.0.0, to be removed in 3.1
98
     */
99
    public function getAmount(Order $Order, Cart $Cart)
0 ignored issues
show
Unused Code introduced by
The parameter $Cart is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
100
    {
101
        return $this->shoppingService->getAmount($Order);
0 ignored issues
show
Deprecated Code introduced by
The method Eccube\Service\ShoppingService::getAmount() has been deprecated with message: PurchaseFlowで行う

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
102
    }
103
104
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$em" missing
Loading history...
introduced by
Doc comment for parameter "$formData" missing
Loading history...
105
     * 下位互換用関数
106
     *
107
     * @param $em トランザクション制御されているEntityManager
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
108
     * @param Order $Order 受注情報
0 ignored issues
show
introduced by
Expected 57 spaces after parameter type; 1 found
Loading history...
109
     * @param $formData フォームデータ
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
110
     *
111
     * @see ShoppingService::setOrderUpdate()
112
     *
113
     * @deprecated since 3.0.0, to be removed in 3.1
114
     */
115
    public function setOrderUpdate($em, Order $Order, $formData)
0 ignored issues
show
Unused Code introduced by
The parameter $em is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
116
    {
117
        $this->shoppingService->setOrderUpdate($Order, $formData);
0 ignored issues
show
Deprecated Code introduced by
The method Eccube\Service\ShoppingService::setOrderUpdate() has been deprecated with message: since 3.0.5, to be removed in 3.1

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
118
    }
119
120
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$em" missing
Loading history...
121
     * 下位互換用関数
122
     *
123
     * @param $em トランザクション制御されているEntityManager
0 ignored issues
show
introduced by
Missing parameter name
Loading history...
124
     * @param Order $Order 受注情報
0 ignored issues
show
introduced by
Expected 57 spaces after parameter type; 1 found
Loading history...
125
     * @param Customer $user ログインユーザ
0 ignored issues
show
introduced by
Expected 54 spaces after parameter type; 1 found
Loading history...
introduced by
Expected 2 spaces after parameter name; 1 found
Loading history...
126
     *
127
     * @see ShoppingService::setCustomerUpdate()
128
     *
129
     * @deprecated since 3.0.0, to be removed in 3.1
130
     */
131
    public function setCustomerUpdate($em, Order $Order, Customer $user)
0 ignored issues
show
Unused Code introduced by
The parameter $em is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
132
    {
133
        $this->shoppingService->setCustomerUpdate($Order, $user);
134
    }
135
136
137
}
138