Completed
Push — master ( 360314...c2aa1e )
by Ryosuke
08:47
created

Client::getInternalCredential()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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;
22
    use \mpyw\Cowitter\Traits\RequestorTrait;
23
    use \mpyw\Cowitter\Traits\UploaderTrait;
24
    use \mpyw\Cowitter\Traits\OAuth2ClientTrait;
25
26 6
    protected function getInternalCredential()
27 6
    {
28 6
        return $this->credential;
29
    }
30
31 6
    protected function getInternalOptions()
32 6
    {
33 6
        return $this->options;
34
    }
35
36 6
    protected function getInternalCurl()
37 6
    {
38 6
        return $this->curl;
39
    }
40
41 6
    protected function setInternalCredential(Credential $credential)
42 6
    {
43 6
        return $this->credential = $credential;
44
    }
45
46 6
    protected function setInternalOptions(array $options)
47 6
    {
48 6
        return $this->options = $options;
49
    }
50
51 6
    protected function setInternalCurl(CurlInitializer $curl)
52 6
    {
53 6
        return $this->curl = $curl;
54
    }
55
}
56