Key   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 17
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getKey() 0 4 1
A __construct() 0 5 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