TransferObjectConverter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 16
c 1
b 0
f 0
dl 0
loc 23
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A convert() 0 18 1
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Ratepay\Business\Api\Converter;
9
10
use Generated\Shared\Transfer\RatepayResponseTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\RatepayResponseTransfer 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
12
class TransferObjectConverter extends BaseConverter
13
{
14
    /**
15
     * @return \Generated\Shared\Transfer\RatepayResponseTransfer
16
     */
17
    public function convert()
18
    {
19
        $responseTransfer = new RatepayResponseTransfer();
20
        $responseTransfer
21
            ->setTransactionId($this->response->getTransactionId())
22
            ->setTransactionShortId($this->response->getTransactionShortId())
23
            ->setSuccessful($this->response->isSuccessful())
24
            ->setReasonCode($this->response->getReasonCode())
25
            ->setReasonText($this->response->getReasonText())
26
            ->setStatusCode($this->response->getStatusCode())
27
            ->setStatusText($this->response->getStatusText())
28
            ->setResultCode($this->response->getResultCode())
29
            ->setResultText($this->response->getResultText())
30
            ->setCustomerMessage($this->response->getCustomerMessage())
31
            ->setPaymentMethod($this->response->getPaymentMethod())
32
            ->setDescriptor($this->response->getDescriptor());
0 ignored issues
show
Bug introduced by
The method getDescriptor() does not exist on SprykerEco\Zed\Ratepay\B...ponse\ResponseInterface. Since it exists in all sub-types, consider adding an abstract or default implementation to SprykerEco\Zed\Ratepay\B...ponse\ResponseInterface. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

32
            ->setDescriptor($this->response->/** @scrutinizer ignore-call */ getDescriptor());
Loading history...
33
34
        return $responseTransfer;
35
    }
36
}
37