Passed
Branch development (0519a2)
by Theodoros
02:02
created

EcondaConfig   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getStoragePdoQueryAdapterClassNames() 0 13 1
A getFileExportPath() 0 3 1
A getHostYves() 0 3 1
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Econda;
9
10
use Spryker\Shared\Application\ApplicationConstants;
0 ignored issues
show
Bug introduced by
The type Spryker\Shared\Application\ApplicationConstants 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 Spryker\Zed\Kernel\AbstractBundleConfig;
0 ignored issues
show
Bug introduced by
The type Spryker\Zed\Kernel\AbstractBundleConfig 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 SprykerEco\Shared\Econda\EcondaConstants;
13
use SprykerEco\Zed\Econda\Persistence\Storage\Pdo\PostgreSql\CategoryNodeEcondaQuery;
0 ignored issues
show
Bug introduced by
The type SprykerEco\Zed\Econda\Pe...CategoryNodeEcondaQuery 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 SprykerEco\Zed\Econda\Persistence\Storage\Pdo\PostgreSql\ProductConcreteEcondaQuery;
0 ignored issues
show
Bug introduced by
The type SprykerEco\Zed\Econda\Pe...ductConcreteEcondaQuery 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
class EcondaConfig extends AbstractBundleConfig
17
{
18
19
    const ECONDA_CSV_DELIMITER = "|";
20
    const ECONDA_CSV_CATEGORY_DELIMITER = "^^";
21
22
    /**
23
     * @return string
24
     */
25
    public function getHostYves()
26
    {
27
        return $this->get(ApplicationConstants::HOST_YVES);
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getFileExportPath()
34
    {
35
        return $this->get(EcondaConstants::ECONDA_CSV_FOLDER_PATH);
36
    }
37
38
    /**
39
     * @param string $dbEngineName
40
     *
41
     * @return array
42
     */
43
    public function getStoragePdoQueryAdapterClassNames($dbEngineName)
44
    {
45
        $data = [
46
            'MySql' => [
47
48
            ],
49
            'PostgreSql' => [
50
                'CategoryNodeEcondaQuery' => CategoryNodeEcondaQuery::class,
51
                'ProductConcreteEcondaQuery' => ProductConcreteEcondaQuery::class,
52
            ],
53
        ];
54
55
        return $data[$dbEngineName];
56
    }
57
58
}
59