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

RestClient::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 2
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