Passed
Push — feature/eco-2295/eco-2344-crea... ( 1e5ae0...217e63 )
by Aleksey
01:02
created

RefundConverter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 5
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A convertToResponseTransfer() 0 6 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\CrefoPayApi\Business\Converter;
9
10
use Generated\Shared\Transfer\CrefoPayApiResponseTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...oPayApiResponseTransfer 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 Psr\Http\Message\ResponseInterface;
0 ignored issues
show
Bug introduced by
The type Psr\Http\Message\ResponseInterface 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...
12
13
class RefundConverter implements CrefoPayApiConverterInterface
14
{
15
    /**
16
     * @var \SprykerEco\Zed\CrefoPayApi\Dependency\Service\CrefoPayApiToUtilEncodingServiceInterface
17
     */
18
    protected $encodingService;
19
20
    /**
21
     * @param \Psr\Http\Message\ResponseInterface $response
22
     *
23
     * @return \Generated\Shared\Transfer\CrefoPayApiResponseTransfer
24
     */
25
    public function convertToResponseTransfer(ResponseInterface $response): CrefoPayApiResponseTransfer
26
    {
27
        $responseBody = $this->encodingService->decodeJson($response->getBody(), true);
0 ignored issues
show
Unused Code introduced by
The assignment to $responseBody is dead and can be removed.
Loading history...
28
        $responseTransfer = new CrefoPayApiResponseTransfer();
29
30
        return $responseTransfer;
31
    }
32
}
33