ProductAttribute   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 124
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

10 Methods

Rating   Name   Duplication   Size   Complexity  
A addOption() 0 4 1
A create() 0 4 1
A setCurrentStore() 0 4 1
A getInfo() 0 4 1
A getList() 0 4 1
A getOptions() 0 4 1
A remove() 0 4 1
A removeOption() 0 4 1
A getTypes() 0 4 1
A update() 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\Catalog;
18
19
use Smalot\Magento\ActionInterface;
20
use Smalot\Magento\MagentoModuleAbstract;
21
22
/**
23
 * Class ProductAttribute
24
 *
25
 * @package Smalot\Magento\Catalog
26
 */
27
class ProductAttribute extends MagentoModuleAbstract
28
{
29
    /**
30
     * Allows you to add a new option for attributes with selectable fields.
31
     *
32
     * @param string $attribute
33
     * @param array  $data
34
     *
35
     * @return ActionInterface
36
     */
37
    public function addOption($attribute, $data)
0 ignored issues
show
Unused Code introduced by
The parameter $attribute 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 $data 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...
38
    {
39
        return $this->__createAction('product_attribute.addOption', func_get_args());
40
    }
41
42
    /**
43
     * Allows you to create a new product attribute.
44
     *
45
     * @param array $data
46
     *
47
     * @return ActionInterface
48
     */
49
    public function create($data)
0 ignored issues
show
Unused Code introduced by
The parameter $data 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('product_attribute.create', func_get_args());
52
    }
53
54
    /**
55
     * Allows you to set/get the current store view.
56
     *
57
     * @param string $storeView
58
     *
59
     * @return ActionInterface
60
     */
61
    public function setCurrentStore($storeView)
0 ignored issues
show
Unused Code introduced by
The parameter $storeView 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...
62
    {
63
        return $this->__createAction('product_attribute.currentStore', func_get_args());
64
    }
65
66
    /**
67
     * Allows you to get full information about a required attribute with the list of options.
68
     *
69
     * @param string $attribute
70
     *
71
     * @return ActionInterface
72
     */
73
    public function getInfo($attribute)
0 ignored issues
show
Unused Code introduced by
The parameter $attribute 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
    {
75
        return $this->__createAction('product_attribute.info', func_get_args());
76
    }
77
78
    /**
79
     * Allows you to retrieve the list of product attributes.
80
     *
81
     * @param string $setId
82
     *
83
     * @return ActionInterface
84
     */
85
    public function getList($setId)
0 ignored issues
show
Unused Code introduced by
The parameter $setId 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...
86
    {
87
        return $this->__createAction('product_attribute.list', func_get_args());
88
    }
89
90
    /**
91
     * Allows you to retrieve the product attribute options.
92
     *
93
     * @param string $attributeId
94
     * @param string $storeView
95
     *
96
     * @return ActionInterface
97
     */
98
    public function getOptions($attributeId, $storeView = null)
0 ignored issues
show
Unused Code introduced by
The parameter $attributeId 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 $storeView 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...
99
    {
100
        return $this->__createAction('product_attribute.options', func_get_args());
101
    }
102
103
    /**
104
     * Allows you to remove the required attribute from a product.
105
     *
106
     * @param string $attribute
107
     *
108
     * @return ActionInterface
109
     */
110
    public function remove($attribute)
0 ignored issues
show
Unused Code introduced by
The parameter $attribute 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...
111
    {
112
        return $this->__createAction('product_attribute.remove', func_get_args());
113
    }
114
115
    /**
116
     * Allows you to remove the option for an attribute.
117
     *
118
     * @param string $attribute
119
     * @param string $optionId
120
     *
121
     * @return ActionInterface
122
     */
123
    public function removeOption($attribute, $optionId)
0 ignored issues
show
Unused Code introduced by
The parameter $attribute 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 $optionId 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...
124
    {
125
        return $this->__createAction('product_attribute.removeOption', func_get_args());
126
    }
127
128
    /**
129
     * Allows you to retrieve the list of possible attribute types.
130
     *
131
     * @return ActionInterface
132
     */
133
    public function getTypes()
134
    {
135
        return $this->__createAction('product_attribute.types', func_get_args());
136
    }
137
138
    /**
139
     * Allows you to update the required attribute.
140
     *
141
     * @param string $attribute
142
     * @param array  $data
143
     *
144
     * @return ActionInterface
145
     */
146
    public function update($attribute, $data)
0 ignored issues
show
Unused Code introduced by
The parameter $attribute 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 $data 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...
147
    {
148
        return $this->__createAction('product_attribute.update', func_get_args());
149
    }
150
}
151