Passed
Push — karoly/akeneo-skeleton ( dfb631 )
by Karoly
05:38
created

CategorySyncer::map()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
rs 10
1
<?php
2
3
4
namespace Spryker\Zed\AkeneoPim\Business\Syncer;
5
6
use Generated\Shared\Transfer\AkeneoCategorySyncConfigTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...egorySyncConfigTransfer 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...
7
use Generated\Shared\Transfer\AkeneoSyncValidateResultTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...cValidateResultTransfer 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...
8
use Generated\Shared\Transfer\AkeneoSyncWriteResultTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...SyncWriteResultTransfer 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...
9
10
class CategorySyncer extends AbstractSyncer
11
{
12
    /**
13
     * @param AkeneoCategorySyncConfigTransfer $categorySyncConfig
14
     *
15
     * @return array
16
     */
17
    protected function read($categorySyncConfig): array
18
    {
19
        return [
20
            [],[],[],
21
        ];
22
    }
23
24
    /**
25
     * @param array $akeneoEntity
26
     * @param AkeneoCategorySyncConfigTransfer $categorySyncConfig
27
     *
28
     * @return AkeneoSyncValidateResultTransfer
29
     */
30
    protected function validate(array $akeneoEntity, $categorySyncConfig): AkeneoSyncValidateResultTransfer
31
    {
32
        return (new AkeneoSyncValidateResultTransfer())->setIsSuccess(true);
33
    }
34
35
    /**
36
     * @param array $akeneoEntity
37
     * @param AkeneoCategorySyncConfigTransfer $categorySyncConfig
38
     *
39
     * @return array
40
     */
41
    protected function translate(array $akeneoEntity, $categorySyncConfig): array
42
    {
43
        return $akeneoEntity;
44
    }
45
46
    /**
47
     * @param array $akeneoEntity
48
     * @param AkeneoCategorySyncConfigTransfer $categorySyncConfig
49
     *
50
     * @return array
51
     */
52
    protected function map(array $akeneoEntity, $categorySyncConfig): array
53
    {
54
        return $akeneoEntity;
55
    }
56
57
    /**
58
     * @param array $sprykerEntity
59
     * @param AkeneoCategorySyncConfigTransfer $categorySyncConfig
60
     *
61
     * @return AkeneoSyncWriteResultTransfer
62
     */
63
    protected function write(array $sprykerEntity, $categorySyncConfig): AkeneoSyncWriteResultTransfer
64
    {
65
        return (new AkeneoSyncWriteResultTransfer())->setIsSuccess(true);
66
    }
67
}
68