Completed
Push — master ( aecb60...ed27b1 )
by Carsten
04:31
created

RestClient   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 27
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

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