Completed
Push — master ( 387ec3...961eec )
by Pieter
06:24
created

Key::getKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
3
namespace PeeHaa\AsyncTwitter\Oauth\Signature;
4
5
use PeeHaa\AsyncTwitter\Credentials\Application;
6
use PeeHaa\AsyncTwitter\Credentials\AccessToken;
7
8
class Key
9
{
10
    private $consumerSecret;
11
12
    private $tokenSecret;
13
14 24
    public function __construct(Application $consumer, AccessToken $accessToken)
15
    {
16 24
        $this->consumerSecret = $consumer->getSecret();
17 24
        $this->tokenSecret    = $accessToken->getSecret();
18 24
    }
19
20 24
    public function getKey(): string
21
    {
22 24
        return sprintf('%s&%s', $this->consumerSecret, $this->tokenSecret);
23
    }
24
}
25