Key::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
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 7
    public function __construct(Application $consumer, AccessToken $accessToken)
15
    {
16 7
        $this->consumerSecret = $consumer->getSecret();
17 7
        $this->tokenSecret    = $accessToken->getSecret();
18
    }
19
20 7
    public function getKey(): string
21
    {
22 7
        return sprintf('%s&%s', $this->consumerSecret, $this->tokenSecret);
23
    }
24
}
25