Completed
Push — master ( 43966f...a8f3db )
by Pieter
03:10
created

Key   A

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 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getKey() 0 4 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 3
    public function __construct(Application $consumer, AccessToken $accessToken)
15
    {
16 3
        $this->consumerSecret = $consumer->getSecret();
17 3
        $this->tokenSecret    = $accessToken->getSecret();
18 3
    }
19
20 3
    public function getKey(): string
21
    {
22 3
        return sprintf('%s&%s', $this->consumerSecret, $this->tokenSecret);
23
    }
24
}
25