Completed
Push — master ( 77c061...ea5498 )
by Mathieu
02:49
created
src/Charcoal/Translation/ConfigurableTranslationTrait.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      *
90 90
      *     If an empty array is provided, the method should consider this a request
91 91
      *     to empty the languages store.
92
-     * @return MultilingualAwareInterface Chainable
92
+     * @return ConfigurableTranslationTrait Chainable
93 93
      */
94 94
     public function setLanguages(array $langs = [])
95 95
     {
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      *
104 104
      * @uses   ConfigurableInterface::config()
105 105
      * @param  LanguageInterface|array|string $lang A language object or identifier.
106
-     * @return MultilingualAwareInterface Chainable
106
+     * @return ConfigurableTranslationTrait Chainable
107 107
      */
108 108
     public function addLanguage($lang)
109 109
     {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      *
118 118
      * @uses   ConfigurableInterface::config()
119 119
      * @param  LanguageInterface|string $lang A language object or identifier.
120
-     * @return MultilingualAwareInterface Chainable
120
+     * @return ConfigurableTranslationTrait Chainable
121 121
      */
122 122
     public function removeLanguage($lang)
123 123
     {
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      *
172 172
      * @uses   ConfigurableInterface::config()
173 173
      * @param  LanguageInterface|string|null $lang A language object or identifier.
174
-     * @return MultilingualAwareInterface Chainable
174
+     * @return ConfigurableTranslationTrait Chainable
175 175
      */
176 176
     public function setDefaultLanguage($lang = null)
177 177
     {
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
      *
205 205
      * @uses   ConfigurableInterface::config()
206 206
      * @param  LanguageInterface|string|null $lang A language object or identifier.
207
-     * @return MultilingualAwareInterface Chainable
207
+     * @return ConfigurableTranslationTrait Chainable
208 208
      */
209 209
     public function setCurrentLanguage($lang = null)
210 210
     {
Please login to merge, or discard this patch.
src/Charcoal/Translation/TranslatableTrait.php 2 patches
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      *
68 68
      * @used-by self::setLanguages()
69 69
      * @used-by self::removeLanguage()
70
-     * @return  MultilingualAwareInterface Chainable
70
+     * @return  TranslatableTrait Chainable
71 71
      */
72 72
     public function resolveSpecialLanguages()
73 73
     {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      *
143 143
      *     If an empty array is provided, the method should consider this a request
144 144
      *     to clear the languages store.
145
-     * @return MultilingualAwareInterface Chainable
145
+     * @return TranslatableTrait Chainable
146 146
      */
147 147
     public function setLanguages(array $langs = [])
148 148
     {
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      * @param  (LanguageInterface|string)[] $langs
164 164
      *     An array of one or more language objects or language identifiers
165 165
      *     to set on the object.
166
-     * @return MultilingualAwareInterface Chainable
166
+     * @return TranslatableTrait Chainable
167 167
      */
168 168
     public function addLanguages(array $langs)
169 169
     {
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      * this method will replace the existing one.
187 187
      *
188 188
      * @param  LanguageInterface|array|string $lang A language object or identifier.
189
-     * @return MultilingualAwareInterface Chainable
189
+     * @return TranslatableTrait Chainable
190 190
      *
191 191
      * @throws InvalidArgumentException if the language is invalid.
192 192
      */
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
      *
216 216
      * @uses   self::resolve_specialLanguages()
217 217
      * @param  LanguageInterface|string $lang A language object or identifier.
218
-     * @return MultilingualAwareInterface Chainable
218
+     * @return TranslatableTrait Chainable
219 219
      *
220 220
      * @throws InvalidArgumentException if an array member isn't a string or instance of LanguageInterface
221 221
      */
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      *
307 307
      * @param  LanguageInterface|string|null $lang A language object or identifier.
308 308
      * @throws InvalidArgumentException If language is invalid.
309
-     * @return MultilingualAwareInterface Chainable
309
+     * @return TranslatableTrait Chainable
310 310
      */
311 311
     public function setDefaultLanguage($lang = null)
312 312
     {
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
      *
359 359
      * @param  LanguageInterface|string|null $lang A language object or identifier.
360 360
      * @throws InvalidArgumentException If language is invalid.
361
-     * @return MultilingualAwareInterface Chainable
361
+     * @return TranslatableTrait Chainable
362 362
      */
363 363
     public function setCurrentLanguage($lang = null)
364 364
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     public function languages(array $langs = [])
96 96
     {
97 97
         if (count($langs)) {
98
-            array_walk($langs, function (&$val, $key) {
98
+            array_walk($langs, function(&$val, $key) {
99 99
                 $val = self::resolveLanguage_ident($val);
100 100
             });
101 101
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $available = array_keys($this->languages);
119 119
 
120 120
         if (count($langs)) {
121
-            array_walk($langs, function (&$val, $key) {
121
+            array_walk($langs, function(&$val, $key) {
122 122
                 $val = self::resolveLanguage_ident($val);
123 123
             });
124 124
 
Please login to merge, or discard this patch.
src/Charcoal/Translation/TranslationString.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     /**
193 193
      * Remove a translation value specified by an available language.
194 194
      *
195
-     * @param  LanguageInterface|string $lang A language object or identifier.
195
+     * @param  string $lang A language object or identifier.
196 196
      * @return self
197 197
      * @throws InvalidArgumentException If language is invalid.
198 198
      */
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      * the translation in the default language is returned.
224 224
      * If $lang isn't provided, the translation in the current language is returned.
225 225
      *
226
-     * @param  LanguageInterface|string|null $lang Optional supported language to retrieve a translation in.
226
+     * @param  string $lang Optional supported language to retrieve a translation in.
227 227
      * @return string
228 228
      * @throws InvalidArgumentException If language is invalid.
229 229
      * @todo   When the language is invalid, should we fallback to the default language
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
      * @param  (LanguageInterface|string)[] $langs
315 315
      *     If an array of one or more lanagues is provided, the method returns
316 316
      *     a subset of the object's available languages (if any).
317
-     * @return (LanguageInterface|string)[] An array of available languages.
317
+     * @return string[] An array of available languages.
318 318
      */
319 319
     public function translations(array $langs = [])
320 320
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -319,7 +319,7 @@
 block discarded – undo
319 319
     public function translations(array $langs = [])
320 320
     {
321 321
         if (count($langs)) {
322
-            array_walk($langs, function (&$val, $key) {
322
+            array_walk($langs, function(&$val, $key) {
323 323
                 $val = self::resolveLanguageIdent($val);
324 324
             });
325 325
 
Please login to merge, or discard this patch.