createTranslationForCurrentLocale()   A
last analyzed

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 3
dl 0
loc 3
rs 10
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\Ratepay\Dependency\Facade;
9
10
use Generated\Shared\Transfer\KeyTranslationTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\KeyTranslationTransfer 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\LocaleTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\LocaleTransfer 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 RatepayToGlossaryBridge implements RatepayToGlossaryInterface
14
{
15
    /**
16
     * @var \Spryker\Zed\Glossary\Business\GlossaryFacadeInterface
17
     */
18
    protected $glossaryFacade;
19
20
    /**
21
     * @param \Spryker\Zed\Glossary\Business\GlossaryFacadeInterface $glossaryFacade
22
     */
23
    public function __construct($glossaryFacade)
24
    {
25
        $this->glossaryFacade = $glossaryFacade;
26
    }
27
28
    /**
29
     * @param int $idKey
30
     * @param array $data
31
     *
32
     * @return string
33
     */
34
    public function translateByKeyId($idKey, array $data = [])
35
    {
36
        return $this->glossaryFacade->translateByKeyId($idKey, $data);
37
    }
38
39
    /**
40
     * @param string $keyName
41
     * @param string $value
42
     * @param bool $isActive
43
     *
44
     * @return \Generated\Shared\Transfer\TranslationTransfer
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\TranslationTransfer 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...
45
     */
46
    public function createTranslationForCurrentLocale($keyName, $value, $isActive = true)
47
    {
48
        return $this->glossaryFacade->createTranslationForCurrentLocale($keyName, $value, $isActive);
49
    }
50
51
    /**
52
     * @param string $keyName
53
     * @param \Generated\Shared\Transfer\LocaleTransfer $locale
54
     * @param string $value
55
     * @param bool $isActive
56
     *
57
     * @return \Generated\Shared\Transfer\TranslationTransfer
58
     */
59
    public function createTranslation($keyName, LocaleTransfer $locale, $value, $isActive = true)
60
    {
61
        return $this->glossaryFacade->createTranslation($keyName, $locale, $value, $isActive);
62
    }
63
64
    /**
65
     * @param string $keyName
66
     * @param \Generated\Shared\Transfer\LocaleTransfer $locale
67
     * @param string $value
68
     * @param bool $isActive
69
     *
70
     * @return \Generated\Shared\Transfer\TranslationTransfer
71
     */
72
    public function createAndTouchTranslation($keyName, LocaleTransfer $locale, $value, $isActive = true)
73
    {
74
        return $this->glossaryFacade->createAndTouchTranslation($keyName, $locale, $value, $isActive);
75
    }
76
77
    /**
78
     * @param string $keyName
79
     *
80
     * @return int
81
     */
82
    public function createKey($keyName)
83
    {
84
        return $this->glossaryFacade->createKey($keyName);
85
    }
86
87
    /**
88
     * @param string $keyName
89
     *
90
     * @return bool
91
     */
92
    public function hasKey($keyName)
93
    {
94
        return $this->glossaryFacade->hasKey($keyName);
95
    }
96
97
    /**
98
     * @api
99
     *
100
     * @param string $keyName
101
     * @param \Generated\Shared\Transfer\LocaleTransfer|null $locale
102
     *
103
     * @return bool
104
     */
105
    public function hasTranslation($keyName, ?LocaleTransfer $locale = null)
106
    {
107
        return $this->glossaryFacade->hasTranslation($keyName, $locale);
108
    }
109
110
    /**
111
     * @param string $keyName
112
     *
113
     * @return int
114
     */
115
    public function getKeyIdentifier($keyName)
116
    {
117
        return $this->glossaryFacade->getKeyIdentifier($keyName);
118
    }
119
120
    /**
121
     * @param int $idKey
122
     *
123
     * @return void
124
     */
125
    public function touchCurrentTranslationForKeyId($idKey)
126
    {
127
        $this->glossaryFacade->touchCurrentTranslationForKeyId($idKey);
128
    }
129
130
    /**
131
     * @param string $keyName
132
     *
133
     * @return int
134
     */
135
    public function getOrCreateKey($keyName)
136
    {
137
        return $this->glossaryFacade->getOrCreateKey($keyName);
138
    }
139
140
    /**
141
     * @param \Generated\Shared\Transfer\KeyTranslationTransfer $keyTranslationTransfer
142
     *
143
     * @return bool
144
     */
145
    public function saveGlossaryKeyTranslations(KeyTranslationTransfer $keyTranslationTransfer)
146
    {
147
        return $this->glossaryFacade->saveGlossaryKeyTranslations($keyTranslationTransfer);
148
    }
149
150
    /**
151
     * @api
152
     *
153
     * @param string $keyName
154
     * @param \Generated\Shared\Transfer\LocaleTransfer $locale
155
     * @param string $value
156
     * @param bool $isActive
157
     *
158
     * @return \Generated\Shared\Transfer\TranslationTransfer
159
     */
160
    public function updateAndTouchTranslation($keyName, LocaleTransfer $locale, $value, $isActive = true)
161
    {
162
        return $this->glossaryFacade->updateAndTouchTranslation($keyName, $locale, $value, $isActive);
163
    }
164
}
165