Completed
Push — master ( e3c91f...1fa2c7 )
by
unknown
02:38
created
src/Charcoal/App/Language/LanguageManager.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -18,25 +18,25 @@  discard block
 block discarded – undo
18 18
 class LanguageManager extends AbstractManager
19 19
 {
20 20
     /**
21
-    * @var LanguageInterface[]
22
-    */
21
+     * @var LanguageInterface[]
22
+     */
23 23
     private $available_langs;
24 24
 
25 25
     /**
26
-    * @var TranslationConfig
27
-    */
26
+     * @var TranslationConfig
27
+     */
28 28
     private $translation_config;
29 29
 
30 30
     /**
31
-    * @var GenericConfig
32
-    */
31
+     * @var GenericConfig
32
+     */
33 33
     private static $language_index;
34 34
 
35 35
     /**
36
-    * Set up the available languages, defaults, and active
37
-    *
38
-    * @return void
39
-    */
36
+     * Set up the available languages, defaults, and active
37
+     *
38
+     * @return void
39
+     */
40 40
     public function setup()
41 41
     {
42 42
         $this->setup_translations();
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
     }
45 45
 
46 46
     /**
47
-    * Set up the available languages, defaults, and active
48
-    *
49
-    * Settings:
50
-    * - languages
51
-    * - default_lang
52
-    *
53
-    * @return void
54
-    */
47
+     * Set up the available languages, defaults, and active
48
+     *
49
+     * Settings:
50
+     * - languages
51
+     * - default_lang
52
+     *
53
+     * @return void
54
+     */
55 55
     public function setup_translations()
56 56
     {
57 57
         $config = $this->config();
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
     }
77 77
 
78 78
     /**
79
-    * Set up the available languages, defaults, and active
80
-    *
81
-    * @return void
82
-    */
79
+     * Set up the available languages, defaults, and active
80
+     *
81
+     * @return void
82
+     */
83 83
     public function setup_languages()
84 84
     {
85 85
         $config = $this->config();
@@ -140,13 +140,13 @@  discard block
 block discarded – undo
140 140
     }
141 141
 
142 142
     /**
143
-    * Resolve a string identifier for a given Language.
144
-    *
145
-    * @param  LanguageInterface &$lang  The instance that needs resolution
146
-    * @param  mixed             $ident  Optional key/index of $config in previous method
147
-    * @return void
148
-    * @throws InvalidArgumentException
149
-    */
143
+     * Resolve a string identifier for a given Language.
144
+     *
145
+     * @param  LanguageInterface &$lang  The instance that needs resolution
146
+     * @param  mixed             $ident  Optional key/index of $config in previous method
147
+     * @return void
148
+     * @throws InvalidArgumentException
149
+     */
150 150
     public function resolve_ident(LanguageInterface &$lang, $ident = null)
151 151
     {
152 152
         if (is_string($ident)) {
@@ -173,12 +173,12 @@  discard block
 block discarded – undo
173 173
     }
174 174
 
175 175
     /**
176
-    * Set the manager's available languages
177
-    *
178
-    * @param  LanguageInterface[] $lang
179
-    * @return self
180
-    * @throws InvalidArgumentException if array has a member that isn't an instance of Language
181
-    */
176
+     * Set the manager's available languages
177
+     *
178
+     * @param  LanguageInterface[] $lang
179
+     * @return self
180
+     * @throws InvalidArgumentException if array has a member that isn't an instance of Language
181
+     */
182 182
     public function set_languages($languages)
183 183
     {
184 184
         $this->languages = [];
@@ -194,11 +194,11 @@  discard block
 block discarded – undo
194 194
     }
195 195
 
196 196
     /**
197
-    * Add or update an available language to the manager
198
-    *
199
-    * @param  LanguageInterface $lang
200
-    * @return self
201
-    */
197
+     * Add or update an available language to the manager
198
+     *
199
+     * @param  LanguageInterface $lang
200
+     * @return self
201
+     */
202 202
     public function add_language(LanguageInterface $lang)
203 203
     {
204 204
         $this->languages[$lang->ident()] = $lang;
@@ -206,21 +206,21 @@  discard block
 block discarded – undo
206 206
     }
207 207
 
208 208
     /**
209
-    * Get the manager's list of available languages
210
-    *
211
-    * @return LanguageInterface[]
212
-    */
209
+     * Get the manager's list of available languages
210
+     *
211
+     * @return LanguageInterface[]
212
+     */
213 213
     public function languages()
214 214
     {
215 215
         return $this->languages;
216 216
     }
217 217
 
218 218
     /**
219
-    * Set the manager's translations for TranslationConfig
220
-    *
221
-    * @param  array|TranslationConfig $translation
222
-    * @return self
223
-    */
219
+     * Set the manager's translations for TranslationConfig
220
+     *
221
+     * @param  array|TranslationConfig $translation
222
+     * @return self
223
+     */
224 224
     public function set_translation($translation)
225 225
     {
226 226
         if ($translation instanceof TranslationConfig) {
@@ -232,10 +232,10 @@  discard block
 block discarded – undo
232 232
     }
233 233
 
234 234
     /**
235
-    * Get the manager's translations
236
-    *
237
-    * @return TranslationConfig
238
-    */
235
+     * Get the manager's translations
236
+     *
237
+     * @return TranslationConfig
238
+     */
239 239
     public function translation()
240 240
     {
241 241
         return $this->translation_config;
Please login to merge, or discard this patch.