Signature   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 11
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A generate() 0 5 1
1
<?php
2
3
namespace Acquia\Search;
4
5
use Acquia\Rest\SignatureAbstract;
6
7
/**
8
 * Generates the HMAC hash used to sign Acquia Search requests.
9
 */
10
class Signature extends SignatureAbstract
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15 12
    public function generate($string)
16
    {
17 12
        $data = $this->getRequestTime() . $this->generateNonce() . $string;
18 12
        return hash_hmac('sha1', $data, $this->getSecretKey());
19
    }
20
}
21