Passed
Push — feature/eco-3047/eco-3049-invo... ( 8f9d80...abf008 )
by Aleksey
05:13
created

HeidelpayPersistenceMapper   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 mapEntityToHeidelpayNotificationTransfer() 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\Zed\Heidelpay\Persistence\Propel\Mapper;
9
10
use Generated\Shared\Transfer\HeidelpayNotificationTransfer;
1 ignored issue
show
Bug introduced by
The type Generated\Shared\Transfe...payNotificationTransfer 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 Orm\Zed\Heidelpay\Persistence\SpyPaymentHeidelpayNotification;
1 ignored issue
show
Bug introduced by
The type Orm\Zed\Heidelpay\Persis...ntHeidelpayNotification 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 HeidelpayPersistenceMapper
14
{
15
    /**
16
     * @param \Orm\Zed\Heidelpay\Persistence\SpyPaymentHeidelpayNotification $paymentHeidelpayNotification
17
     * @param \Generated\Shared\Transfer\HeidelpayNotificationTransfer $heidelpayNotificationTransfer
18
     *
19
     * @return \Generated\Shared\Transfer\HeidelpayNotificationTransfer
20
     */
21
    public function mapEntityToHeidelpayNotificationTransfer(
22
        SpyPaymentHeidelpayNotification $paymentHeidelpayNotification,
23
        HeidelpayNotificationTransfer $heidelpayNotificationTransfer
24
    ): HeidelpayNotificationTransfer {
25
        $heidelpayNotificationTransfer->fromArray(
26
            $paymentHeidelpayNotification->toArray(),
27
            true
28
        );
29
30
        return $heidelpayNotificationTransfer;
31
    }
32
}
33