Passed
Pull Request — master (#17)
by Stanislav
10:22
created

FirstDataAuthorizeSessionParametersCheckoutDataResponseMapperPlugin   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A mapRestCheckoutDataResponseTransferToRestCheckoutDataResponseAttributesTransfer() 0 10 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\Glue\FirstData\Plugin\CheckoutRestApi;
9
10
use Generated\Shared\Transfer\RestCheckoutDataResponseAttributesTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...ponseAttributesTransfer 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 Generated\Shared\Transfer\RestCheckoutDataTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\RestCheckoutDataTransfer 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
use Generated\Shared\Transfer\RestCheckoutRequestAttributesTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...questAttributesTransfer 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...
13
use Spryker\Glue\CheckoutRestApiExtension\Dependency\Plugin\CheckoutDataResponseMapperPluginInterface;
0 ignored issues
show
Bug introduced by
The type Spryker\Glue\CheckoutRes...seMapperPluginInterface 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...
14
use Spryker\Glue\Kernel\AbstractPlugin;
0 ignored issues
show
Bug introduced by
The type Spryker\Glue\Kernel\AbstractPlugin 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...
15
16
/**
17
 * @method \SprykerEco\Glue\FirstData\FirstDataFactory getFactory()
18
 */
19
class FirstDataAuthorizeSessionParametersCheckoutDataResponseMapperPlugin extends AbstractPlugin implements CheckoutDataResponseMapperPluginInterface
20
{
21
    /**
22
     * {@inheritDoc}
23
     * - Maps `AuthorizeSessionResponseTransfer` to `RestCheckoutDataResponseAttributesTransfer.firstDataAuthorizeSessionParameters`.
24
     *
25
     * @api
26
     *
27
     * @param \Generated\Shared\Transfer\RestCheckoutDataTransfer $restCheckoutDataTransfer
28
     * @param \Generated\Shared\Transfer\RestCheckoutRequestAttributesTransfer $restCheckoutRequestAttributesTransfer
29
     * @param \Generated\Shared\Transfer\RestCheckoutDataResponseAttributesTransfer $restCheckoutResponseAttributesTransfer
30
     *
31
     * @return \Generated\Shared\Transfer\RestCheckoutDataResponseAttributesTransfer
32
     */
33
    public function mapRestCheckoutDataResponseTransferToRestCheckoutDataResponseAttributesTransfer(
34
        RestCheckoutDataTransfer $restCheckoutDataTransfer,
35
        RestCheckoutRequestAttributesTransfer $restCheckoutRequestAttributesTransfer,
36
        RestCheckoutDataResponseAttributesTransfer $restCheckoutResponseAttributesTransfer
37
    ): RestCheckoutDataResponseAttributesTransfer {
38
        return $this->getFactory()
39
            ->createFirstDataAuthorizeSessionParametersMapper()
40
            ->mapFirstDataAuthorizeSessionParametersTransferToRestCheckoutDataResponseAttributesTransfer(
41
                $restCheckoutResponseAttributesTransfer,
42
                $restCheckoutDataTransfer
43
            );
44
    }
45
}
46