Completed
Push — master ( 387ec3...961eec )
by Pieter
06:24
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 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