SupportingDocumentGateway   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 8
dl 0
loc 23
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A addDocument() 0 11 1
1
<?php
2
/*
3
 * This file is part of the PayBreak/paybreak-sdk-php 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
 * Supporting Document Gateway
15
 *
16
 * @author EB
17
 * @package PayBreak\Sdk\Gateways
18
 */
19
class SupportingDocumentGateway extends AbstractGateway
20
{
21
    /**
22
     * @author EB
23
     * @param string $token
24
     * @param string $installation
25
     * @param string $application
26
     * @param string $category
27
     * @param string $filename
28
     * @param string $path
29
     * @return array
30
     */
31 1
    public function addDocument($token, $installation, $application, $category, $filename, $path)
32
    {
33 1
        return $this->postDocument(
34 1
            '/v4/installations/' . $installation . '/applications/' . $application . '/supporting-documents',
35
            [
36 1
                'category' => $category,
37 1
                'filename' => $filename,
38 1
                'path' => $path,
39 1
            ],
40 1
            $token,
41
            'Supporting documents'
42 1
        );
43
    }
44
}
45