OrderCreditMemo   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 78
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 5
c 3
b 0
f 0
lcom 1
cbo 1
dl 0
loc 78
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A addComment() 0 4 1
A cancel() 0 4 1
A create() 0 10 1
A getInfo() 0 4 1
A getList() 0 4 1
1
<?php
2
3
/**
4
 * @file
5
 *          Magento API Client (SOAP v1).
6
 *          Allows wrappers for each call, dependencies injections
7
 *          and code completion.
8
 *
9
 * @author  Sébastien MALOT <[email protected]>
10
 * @license MIT
11
 * @url     <https://github.com/smalot/magento-client>
12
 *
13
 * For the full copyright and license information, please view the LICENSE
14
 * file that was distributed with this source code.
15
 */
16
17
namespace Smalot\Magento\Order;
18
19
use Smalot\Magento\ActionInterface;
20
use Smalot\Magento\MagentoModuleAbstract;
21
22
/**
23
 * Class OrderCreditMemo
24
 *
25
 * @package Smalot\Magento\Order
26
 */
27
class OrderCreditMemo extends MagentoModuleAbstract
28
{
29
    /**
30
     * Allows you to add a new comment to an existing credit memo.
31
     * Email notification can be sent to the user email.
32
     *
33
     * @param string $creditmemoIncrementId
34
     * @param string $comment
35
     * @param string $notifyCustomer
36
     * @param string $includeComment
37
     *
38
     * @return ActionInterface
39
     */
40
    public function addComment($creditmemoIncrementId, $comment = null, $notifyCustomer = null, $includeComment = null)
0 ignored issues
show
Unused Code introduced by
The parameter $creditmemoIncrementId 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 $comment 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 $notifyCustomer 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 $includeComment 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...
41
    {
42
        return $this->__createAction('order_creditmemo.addComment', func_get_args());
43
    }
44
45
    /**
46
     * Allows you to cancel an existing credit memo.
47
     *
48
     * @param string $creditmemoIncrementId
49
     *
50
     * @return ActionInterface
51
     */
52
    public function cancel($creditmemoIncrementId)
0 ignored issues
show
Unused Code introduced by
The parameter $creditmemoIncrementId 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...
53
    {
54
        return $this->__createAction('order_creditmemo.cancel', func_get_args());
55
    }
56
57
    /**
58
     * Allows you to create a new credit memo for the invoiced order.
59
     * Comments can be added and an email notification can be sent to the user email.
60
     *
61
     * @param string $orderIncrementId
62
     * @param array  $creditmemoData
63
     * @param string $comment
64
     * @param int    $notifyCustomer
65
     * @param int    $includeComment
66
     * @param string $refundToStoreCreditAmount
67
     *
68
     * @return ActionInterface
69
     */
70
    public function create(
71
        $orderIncrementId,
0 ignored issues
show
Unused Code introduced by
The parameter $orderIncrementId 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...
72
        $creditmemoData = null,
0 ignored issues
show
Unused Code introduced by
The parameter $creditmemoData 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...
73
        $comment = null,
0 ignored issues
show
Unused Code introduced by
The parameter $comment 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...
74
        $notifyCustomer = null,
0 ignored issues
show
Unused Code introduced by
The parameter $notifyCustomer 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...
75
        $includeComment = null,
0 ignored issues
show
Unused Code introduced by
The parameter $includeComment 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...
76
        $refundToStoreCreditAmount = null
0 ignored issues
show
Unused Code introduced by
The parameter $refundToStoreCreditAmount 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...
77
    ) {
78
        return $this->__createAction('order_creditmemo.create', func_get_args());
79
    }
80
81
    /**
82
     * Allows you to retrieve full information about the specified credit memo.
83
     *
84
     * @param string $creditmemoIncrementId
85
     *
86
     * @return ActionInterface
87
     */
88
    public function getInfo($creditmemoIncrementId)
0 ignored issues
show
Unused Code introduced by
The parameter $creditmemoIncrementId 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...
89
    {
90
        return $this->__createAction('order_creditmemo.info', func_get_args());
91
    }
92
93
    /**
94
     * Allows you to retrieve the list of credit memos by filters.
95
     *
96
     * @param array $filters
97
     *
98
     * @return ActionInterface
99
     */
100
    public function getList($filters)
0 ignored issues
show
Unused Code introduced by
The parameter $filters 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...
101
    {
102
        return $this->__createAction('order_creditmemo.list', func_get_args());
103
    }
104
}
105