Events   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 100 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 27
loc 27
ccs 6
cts 6
cp 1
rs 10
c 1
b 0
f 0
wmc 1
lcom 1
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A getEncryptionKey() 16 16 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace Sausin\Signere;
4
5 View Code Duplication
class Events extends BaseClass
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
6
{
7
    /** The URI of the action */
8
    const URI = 'https://api.signere.no/api/events/encryptionkey';
9
10
    /**
11
     * Returns the EventsQueue encryptionKey as a base64 encoded string.
12
     *
13
     * @return object
14
     */
15 1
    public function getEncryptionKey()
16
    {
17
        // make the URL for this request
18 1
        $url = $this->getBaseUrl();
19
20
        // get the headers for this request
21 1
        $headers = $this->headers->make('GET', $url);
22
23
        // get the response
24 1
        $response = $this->client->get($url, [
25 1
            'headers' => $headers,
26
        ]);
27
28
        // return the response
29 1
        return $response;
30
    }
31
}
32