Completed
Pull Request — develop (#33)
by Gergely
02:54
created

DocumentGateway::getAgreementPdf()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 10
Ratio 100 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 10
loc 10
ccs 6
cts 6
cp 1
rs 9.4285
cc 1
eloc 6
nc 1
nop 3
crap 1
1
<?php
2
/*
3
 * This file is part of the PayBreak/basket package.
4
 *
5
 * (c) PayBreak <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace PayBreak\Sdk\Gateways;
12
13
/**
14
 * Class DocumentGateway
15
 *
16
 * @author GK
17
 * @package PayBreak\Sdk\Gateways
18
 */
19
class DocumentGateway extends AbstractGateway
20
{
21
    /**
22
     * @author GK
23
     * @param string $token
24
     * @param string $installation
25
     * @param int $application
26
     * @return array
27
     */
28 2 View Code Duplication
    public function getAgreementPdf($token, $installation, $application)
0 ignored issues
show
Duplication introduced by
This method 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...
29
    {
30 2
        $document = $this->fetchDocument(
31 2
            '/v4/installations/' . $installation . '/applications/' . $application . '/agreement',
32 2
            $token,
33
            'Agreement Pdf'
34 2
        );
35
36 2
        return $document['pdf'];
37
    }
38
39
    /**
40
     * @author GK
41
     * @param string $token
42
     * @param string $installation
43
     * @param int $application
44
     * @return array
45
     */
46 2 View Code Duplication
    public function getPreAgreementPdf($token, $installation, $application)
0 ignored issues
show
Duplication introduced by
This method 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...
47
    {
48 2
        $document = $this->fetchDocument(
49 2
            '/v4/installations/' . $installation . '/applications/' . $application . '/pre-agreement',
50 2
            $token,
51
            'Pre-agreement Pdf'
52 2
        );
53
54 2
        return $document['pdf'];
55
    }
56
}
57