MagentoModuleAbstract   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __createAction() 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;
18
19
use Smalot\Magento\RemoteAdapterInterface;
20
21
/**
22
 * Class MagentoModuleAbstract
23
 *
24
 * @package Smalot\Magento
25
 */
26
abstract class MagentoModuleAbstract
27
{
28
    /**
29
     * @var RemoteAdapterInterface
30
     */
31
    protected $remoteAdapter;
32
33
    /**
34
     * @param RemoteAdapterInterface $remoteAdapter
35
     */
36
    public function __construct(RemoteAdapterInterface $remoteAdapter)
37
    {
38
        $this->remoteAdapter = $remoteAdapter;
39
    }
40
41
    /**
42
     * @param string $method
43
     * @param array  $arguments
44
     *
45
     * @return ActionInterface
46
     */
47
    protected function __createAction($method, $arguments = array())
48
    {
49
        return new Action($method, $arguments, $this->remoteAdapter);
50
    }
51
}
52