PunchoutCatalogsToVaultFacadeBridge   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 36
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A retrieve() 0 3 1
A store() 0 3 1
A __construct() 0 3 1
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\Dependency\Facade;
9
10
class PunchoutCatalogsToVaultFacadeBridge implements PunchoutCatalogsToVaultFacadeInterface
11
{
12
    /**
13
     * @var \Spryker\Zed\Vault\Business\VaultFacadeInterface
14
     */
15
    protected $vaultFacade;
16
17
    /**
18
     * @param \Spryker\Zed\Vault\Business\VaultFacadeInterface $vaultFacade
19
     */
20
    public function __construct($vaultFacade)
21
    {
22
        $this->vaultFacade = $vaultFacade;
23
    }
24
25
    /**
26
     * @param string $dataType
27
     * @param string $dataKey
28
     * @param string $data
29
     *
30
     * @return bool
31
     */
32
    public function store(string $dataType, string $dataKey, string $data): bool
33
    {
34
        return $this->vaultFacade->store($dataType, $dataKey, $data);
35
    }
36
37
    /**
38
     * @param string $dataType
39
     * @param string $dataKey
40
     *
41
     * @return string|null
42
     */
43
    public function retrieve(string $dataType, string $dataKey): ?string
44
    {
45
        return $this->vaultFacade->retrieve($dataType, $dataKey);
46
    }
47
}
48