Cart   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 68
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A getInfo() 0 4 1
A getLicense() 0 4 1
A order() 0 4 1
A getTotals() 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\Cart;
18
19
use Smalot\Magento\ActionInterface;
20
use Smalot\Magento\MagentoModuleAbstract;
21
22
/**
23
 * Class Cart
24
 *
25
 * @package Smalot\Magento\Cart
26
 */
27
class Cart extends MagentoModuleAbstract
28
{
29
    /**
30
     * Allows you to create an empty shopping cart.
31
     *
32
     * @param string $storeId
33
     *
34
     * @return ActionInterface
35
     */
36
    public function create($storeId = null)
0 ignored issues
show
Unused Code introduced by
The parameter $storeId 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...
37
    {
38
        return $this->__createAction('cart.create', func_get_args());
39
    }
40
41
    /**
42
     * Allows you to retrieve full information about the shopping cart (quote).
43
     *
44
     * @param int    $quoteId
45
     * @param string $store
46
     *
47
     * @return ActionInterface
48
     */
49
    public function getInfo($quoteId, $store = null)
0 ignored issues
show
Unused Code introduced by
The parameter $quoteId 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 $store 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...
50
    {
51
        return $this->__createAction('cart.info', func_get_args());
52
    }
53
54
    /**
55
     * Allows you to retrieve the website license agreement for the quote according to the website (store).
56
     *
57
     * @param int    $quoteId
58
     * @param string $store
59
     *
60
     * @return ActionInterface
61
     */
62
    public function getLicense($quoteId, $store = null)
0 ignored issues
show
Unused Code introduced by
The parameter $quoteId 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 $store 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...
63
    {
64
        return $this->__createAction('cart.license', func_get_args());
65
    }
66
67
    /**
68
     * Allows you to create an order from a shopping cart (quote).
69
     * Before placing the order, you need to add the customer, customer address, shipping and payment methods.
70
     *
71
     * @param int    $quoteId
72
     * @param string $store
73
     * @param array  $agreements
74
     *
75
     * @return ActionInterface
76
     */
77
    public function order($quoteId, $store = null, $agreements = null)
0 ignored issues
show
Unused Code introduced by
The parameter $quoteId 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 $store 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 $agreements 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...
78
    {
79
        return $this->__createAction('cart.order', func_get_args());
80
    }
81
82
    /**
83
     * Allows you to retrieve total prices for a shopping cart (quote).
84
     *
85
     * @param int    $quoteId
86
     * @param string $store
87
     *
88
     * @return ActionInterface
89
     */
90
    public function getTotals($quoteId, $store = null)
0 ignored issues
show
Unused Code introduced by
The parameter $quoteId 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 $store 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...
91
    {
92
        return $this->__createAction('cart.totals', func_get_args());
93
    }
94
}
95