Code Duplication    Length = 26-27 lines in 2 locations

src/DocumentConvert.php 1 location

@@ 5-30 (lines=26) @@
2
3
namespace Sausin\Signere;
4
5
class DocumentConvert extends BaseClass
6
{
7
    /** The URI of the action */
8
    const URI = 'https://api.signere.no/api/DocumentConvert';
9
10
    /**
11
     * Convert format of the document to PDF.
12
     *
13
     * @param  array  $body
14
     * @return object
15
     * @todo fix it for proper setup with file
16
     */
17
    public function convert(array $body)
18
    {
19
        // make the URL for this request
20
        $url = $this->getBaseUrl();
21
22
        // get the response
23
        $response = $this->client->post($url, [
24
            'json' => $body,
25
        ]);
26
27
        // return the response
28
        return $response;
29
    }
30
}
31

src/Events.php 1 location

@@ 5-31 (lines=27) @@
2
3
namespace Sausin\Signere;
4
5
class Events extends BaseClass
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
    public function getEncryptionKey()
16
    {
17
        // make the URL for this request
18
        $url = $this->getBaseUrl();
19
20
        // get the headers for this request
21
        $headers = $this->headers->make('GET', $url);
22
23
        // get the response
24
        $response = $this->client->get($url, [
25
            'headers' => $headers,
26
        ]);
27
28
        // return the response
29
        return $response;
30
    }
31
}
32