mapPunchoutCatalogConnectionCartTransferToEntity()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 3
c 1
b 0
f 1
nc 1
nop 2
dl 0
loc 8
rs 10
1
<?php
2
3
/**
4
 * Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\PunchoutCatalogs\Persistence\Propel\Mapper;
9
10
use Generated\Shared\Transfer\PunchoutCatalogConnectionCartTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...gConnectionCartTransfer 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\PunchoutCatalog\Persistence\PgwPunchoutCatalogConnectionCart;
0 ignored issues
show
Bug introduced by
The type Orm\Zed\PunchoutCatalog\...utCatalogConnectionCart 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 PunchoutCatalogsConnectionCartMapper
14
{
15
    /**
16
     * @param \Orm\Zed\PunchoutCatalog\Persistence\PgwPunchoutCatalogConnectionCart $punchoutCatalogConnectionCartEntity
17
     * @param \Generated\Shared\Transfer\PunchoutCatalogConnectionCartTransfer $punchoutCatalogConnectionCartTransfer
18
     *
19
     * @return \Generated\Shared\Transfer\PunchoutCatalogConnectionCartTransfer
20
     */
21
    public function mapPunchoutCatalogConnectionCartEntityToTransfer(
22
        PgwPunchoutCatalogConnectionCart $punchoutCatalogConnectionCartEntity,
23
        PunchoutCatalogConnectionCartTransfer $punchoutCatalogConnectionCartTransfer
24
    ): PunchoutCatalogConnectionCartTransfer {
25
        $punchoutCatalogConnectionCartTransfer->fromArray($punchoutCatalogConnectionCartEntity->toArray(), true);
26
        $punchoutCatalogConnectionCartTransfer->setIdPunchoutCatalogCart($punchoutCatalogConnectionCartEntity->getIdPunchoutCatalogConnectionCart());
27
28
        return $punchoutCatalogConnectionCartTransfer;
29
    }
30
31
    /**
32
     * @param \Generated\Shared\Transfer\PunchoutCatalogConnectionCartTransfer $punchoutCatalogConnectionCartTransfer
33
     * @param \Orm\Zed\PunchoutCatalog\Persistence\PgwPunchoutCatalogConnectionCart $punchoutCatalogConnectionCartEntity
34
     *
35
     * @return \Orm\Zed\PunchoutCatalog\Persistence\PgwPunchoutCatalogConnectionCart
36
     */
37
    public function mapPunchoutCatalogConnectionCartTransferToEntity(
38
        PunchoutCatalogConnectionCartTransfer $punchoutCatalogConnectionCartTransfer,
39
        PgwPunchoutCatalogConnectionCart $punchoutCatalogConnectionCartEntity
40
    ): PgwPunchoutCatalogConnectionCart {
41
        $punchoutCatalogConnectionCartEntity->fromArray($punchoutCatalogConnectionCartTransfer->toArray());
42
        $punchoutCatalogConnectionCartEntity->setIdPunchoutCatalogConnectionCart($punchoutCatalogConnectionCartTransfer->getIdPunchoutCatalogCart());
43
44
        return $punchoutCatalogConnectionCartEntity;
45
    }
46
}
47