Completed
Push — master ( e41c6a...6a7f08 )
by Saurabh
03:07
created

Events::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 6
Ratio 100 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 3
dl 6
loc 6
ccs 5
cts 5
cp 1
crap 1
rs 9.4285
c 1
b 0
f 0
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->transformUrl(self::URI);
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