Completed
Push — fix-checkstyle ( 525678...700890 )
by
unknown
03:06
created

AbstractApi   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setParameters() 0 4 1
execute() 0 1 ?
1
<?php
2
3
namespace Akeneo\Crowdin\Api;
4
5
use Akeneo\Crowdin\Client;
6
7
/**
8
 * Abstract API
9
 *
10
 * @author Nicolas Dupont <[email protected]>
11
 */
12
abstract class AbstractApi implements ApiInterface
13
{
14
    /** @var Client */
15
    protected $client;
16
17
    /**
18
     * The method parameters
19
     *
20
     * @var array
21
     */
22
    protected $parameters = [];
23
24
    /**
25
     * Instantiate an API
26
     *
27
     * @param Client $client
28
     */
29
    public function __construct(Client $client)
30
    {
31
        $this->client = $client;
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function setParameters(array $parameters)
38
    {
39
        $this->parameters = $parameters;
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45
    abstract public function execute();
46
}
47