Completed
Push — add-branch ( 88ebbf...f15293 )
by
unknown
02:08
created

AbstractApi   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 4
Bugs 0 Features 3
Metric Value
wmc 2
c 4
b 0
f 3
lcom 0
cbo 0
dl 0
loc 37
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 Crowdin\Api;
4
5
use Crowdin\Client;
6
7
/**
8
 * Abstract API
9
 *
10
 * @author Nicolas Dupont <[email protected]>
11
 */
12
abstract class AbstractApi implements ApiInterface
13
{
14
    /**
15
     * @var Client
16
     */
17
    protected $client;
18
19
    /**
20
     * The method parameters
21
     *
22
     * @var array
23
     */
24
    protected $parameters = array();
25
26
    /**
27
     * Instanciat an API
28
     *
29
     * @param Client $client
30
     */
31
    public function __construct(Client $client)
32
    {
33
        $this->client = $client;
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function setParameters(array $parameters)
40
    {
41
        $this->parameters = $parameters;
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    abstract public function execute();
48
}
49