Passed
Push — master ( e5e694...addfa6 )
by Carsten
01:58
created

RestClient   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 26
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace Lenius\Economic;
4
5
use Lenius\Economic\API\Client;
6
use Lenius\Economic\API\Request;
7
8
class RestClient
9
{
10
    /**
11
     * Contains the Economic_Request object.
12
     **/
13
    public $request;
14
15
    /**
16
     * __construct function.
17
     *
18
     * Instantiates the main class.
19
     * Creates a client which is passed to the request construct.
20
     *
21
     * @auth_string string Authentication string for Economic
22
     *
23
     * @param string $secret_token
24
     * @param string $grant_token
25
     *
26
     * @throws API\Exception
27
     */
28 4
    public function __construct($secret_token = '', $grant_token = '')
29
    {
30 4
        $client = new Client($secret_token, $grant_token);
31 4
        $this->request = new Request($client);
32 4
    }
33
}
34