Client   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 19
c 1
b 0
f 0
dl 0
loc 46
ccs 18
cts 18
cp 1
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getInternalCredential() 0 3 1
A setInternalCurl() 0 3 1
A setInternalCredential() 0 3 1
A getInternalCurl() 0 3 1
A getInternalOptions() 0 3 1
A setInternalOptions() 0 3 1
1
<?php
2
3
namespace mpyw\Cowitter;
4
5
use mpyw\Cowitter\Components\Credential;
6
use mpyw\Cowitter\Components\CurlInitializer;
7
8
class Client implements \ArrayAccess, ClientInterface
9
{
10
    protected static $defaultOptions = [
11
        CURLOPT_CONNECTTIMEOUT => 10,
12
        CURLOPT_TIMEOUT        => 20,
13
        CURLOPT_ENCODING       => 'gzip',
14
    ];
15
16
    protected $credential;
17
    protected $options;
18
    protected $curl;
19
20
    use \mpyw\Cowitter\Traits\BaseClientTrait;
21
    use \mpyw\Cowitter\Traits\AuthenticatorTrait;
0 ignored issues
show
introduced by
The trait mpyw\Cowitter\Traits\AuthenticatorTrait requires some properties which are not provided by mpyw\Cowitter\Client: $oauth_token, $oauth_token_secret
Loading history...
22
    use \mpyw\Cowitter\Traits\RequestorTrait;
23
    use \mpyw\Cowitter\Traits\UploaderTrait;
0 ignored issues
show
introduced by
The trait mpyw\Cowitter\Traits\UploaderTrait requires some properties which are not provided by mpyw\Cowitter\Client: $name, $processing_info, $state, $check_after_secs, $media_id_string, $code, $error, $message, $progress_percent
Loading history...
24
    use \mpyw\Cowitter\Traits\OAuth2ClientTrait;
0 ignored issues
show
Bug introduced by
The trait mpyw\Cowitter\Traits\OAuth2ClientTrait requires the property $access_token which is not provided by mpyw\Cowitter\Client.
Loading history...
25
26 68
    protected function getInternalCredential()
27 68
    {
28 68
        return $this->credential;
29
    }
30
31 68
    protected function getInternalOptions()
32 68
    {
33 68
        return $this->options;
34
    }
35
36 66
    protected function getInternalCurl()
37 66
    {
38 66
        return $this->curl;
39
    }
40
41 68
    protected function setInternalCredential(Credential $credential)
42 68
    {
43 68
        return $this->credential = $credential;
44
    }
45
46 68
    protected function setInternalOptions(array $options)
47 68
    {
48 68
        return $this->options = $options;
49
    }
50
51 68
    protected function setInternalCurl(CurlInitializer $curl)
52 68
    {
53 68
        return $this->curl = $curl;
54
    }
55
}
56