ApprovalTextAdapter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 9
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getUrl() 0 8 1
A getMethod() 0 3 1
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Zed\Easycredit\Business\Api\Adapter\Http;
9
10
use Generated\Shared\Transfer\EasycreditRequestTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...sycreditRequestTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
use Symfony\Component\HttpFoundation\Request;
12
13
class ApprovalTextAdapter extends AbstractAdapter
14
{
15
    protected const URL_APPROVAL_TEXT_IDENTIFIER = 'zustimmung';
16
17
    /**
18
     * @param \Generated\Shared\Transfer\EasycreditRequestTransfer $easycreditRequestTransfer
19
     *
20
     * @return string
21
     */
22
    protected function getUrl(EasycreditRequestTransfer $easycreditRequestTransfer): string
23
    {
24
        return sprintf(
25
            '%s/%s/%s/%s',
26
            $this->config->getApiUrl(),
27
            static::REQUEST_TYPE_TEXT,
28
            static::URL_APPROVAL_TEXT_IDENTIFIER,
29
            $this->config->getShopIdentifier()
30
        );
31
    }
32
33
    /**
34
     * @return string
35
     */
36
    protected function getMethod(): string
37
    {
38
        return Request::METHOD_GET;
39
    }
40
}
41