Passed
Pull Request — feature/eco-2295/dev (#1)
by Aleksey
02:44 queued 01:11
created

mapPaymentCrefoPayApiLogTransferToEntityTransfer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 2
dl 0
loc 10
rs 10
c 0
b 0
f 0
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\Persistence\Mapper;
9
10
use Generated\Shared\Transfer\PaymentCrefoPayApiLogTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...tCrefoPayApiLogTransfer 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\SpyPaymentCrefoPayApiLogEntityTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...PayApiLogEntityTransfer 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 CrefoPayApiPersistenceMapper implements CrefoPayApiPersistenceMapperInterface
14
{
15
    /**
16
     * @param \Generated\Shared\Transfer\PaymentCrefoPayApiLogTransfer $paymentCrefoPayApiLogTransfer
17
     * @param \Generated\Shared\Transfer\SpyPaymentCrefoPayApiLogEntityTransfer $paymentCrefoPayApiLogEntityTransfer
18
     *
19
     * @return \Generated\Shared\Transfer\SpyPaymentCrefoPayApiLogEntityTransfer
20
     */
21
    public function mapPaymentCrefoPayApiLogTransferToEntityTransfer(
22
        PaymentCrefoPayApiLogTransfer $paymentCrefoPayApiLogTransfer,
23
        SpyPaymentCrefoPayApiLogEntityTransfer $paymentCrefoPayApiLogEntityTransfer
24
    ): SpyPaymentCrefoPayApiLogEntityTransfer {
25
        $paymentCrefoPayApiLogEntityTransfer->fromArray(
26
            $paymentCrefoPayApiLogTransfer->modifiedToArray(),
27
            true
28
        );
29
30
        return $paymentCrefoPayApiLogEntityTransfer;
31
    }
32
33
    /**
34
     * @param \Generated\Shared\Transfer\SpyPaymentCrefoPayApiLogEntityTransfer $paymentCrefoPayApiLogEntityTransfer
35
     * @param \Generated\Shared\Transfer\PaymentCrefoPayApiLogTransfer $paymentCrefoPayApiLogTransfer
36
     *
37
     * @return \Generated\Shared\Transfer\PaymentCrefoPayApiLogTransfer
38
     */
39
    public function mapEntityTransferToPaymentCrefoPayApiLogTransfer(
40
        SpyPaymentCrefoPayApiLogEntityTransfer $paymentCrefoPayApiLogEntityTransfer,
41
        PaymentCrefoPayApiLogTransfer $paymentCrefoPayApiLogTransfer
42
    ): PaymentCrefoPayApiLogTransfer {
43
        $paymentCrefoPayApiLogTransfer->fromArray(
44
            $paymentCrefoPayApiLogEntityTransfer->toArray(),
45
            true
46
        );
47
48
        return $paymentCrefoPayApiLogTransfer;
49
    }
50
}
51