@@ -178,8 +178,8 @@ public function updateLanguages()
178
178
$ client = $ this ->getClient ();
179
179
180
180
try {
181
- $ res = $ client ->request ('GET ' , $ this ->getApiUrl () . 'languages ' , [
182
- 'auth ' => $ this ->getAuthentication (),
181
+ $ res = $ client ->request ('GET ' , $ this ->getApiUrl (). 'languages ' , [
182
+ 'auth ' => $ this ->getAuthentication (),
183
183
'query ' => [
184
184
'timestamp ' => 'on ' ,
185
185
],
@@ -189,7 +189,7 @@ public function updateLanguages()
189
189
throw new ApiException ("API returned status [ {$ res ->getStatusCode ()}]. " );
190
190
}
191
191
192
- $ languages = json_decode ((string )$ res ->getBody ());
192
+ $ languages = json_decode ((string ) $ res ->getBody ());
193
193
194
194
Cache::forever ('languagecenter.languages ' , $ languages );
195
195
Cache::forever ('languagecenter.timestamp ' , $ timestamp );
@@ -213,15 +213,15 @@ public function updateStrings($locale, $platform = null)
213
213
214
214
$ client = $ this ->getClient ();
215
215
216
- $ res = $ client ->request ('GET ' , $ this ->getApiUrl () . 'strings?platform= ' . $ platform . '&language= ' . $ locale , [
216
+ $ res = $ client ->request ('GET ' , $ this ->getApiUrl (). 'strings?platform= ' . $ platform. '&language= ' . $ locale , [
217
217
'auth ' => $ this ->getAuthentication (),
218
218
]);
219
219
220
220
if ($ res ->getStatusCode () != 200 ) {
221
221
throw new ApiException ("API returned status [ {$ res ->getStatusCode ()}]. " );
222
222
}
223
223
224
- $ strings = json_decode ((string )$ res ->getBody ());
224
+ $ strings = json_decode ((string ) $ res ->getBody ());
225
225
226
226
if (!isset ($ this ->strings [$ locale ])) {
227
227
$ this ->strings [$ locale ] = [];
@@ -235,7 +235,7 @@ public function updateStrings($locale, $platform = null)
235
235
}
236
236
237
237
Cache::forever ('languagecenter.strings ' , $ this ->strings );
238
- Cache::forever ('languagecenter.language. ' . $ locale . '.timestamp ' , $ timestamp );
238
+ Cache::forever ('languagecenter.language. ' . $ locale. '.timestamp ' , $ timestamp );
239
239
} catch (\Exception $ exception ) {
240
240
// failed to update string - it's okay - we do it later
241
241
}
@@ -259,14 +259,14 @@ public function createString($key, $string, $platform = null, $comment = null)
259
259
try {
260
260
$ client = $ this ->getClient ();
261
261
262
- $ res = $ client ->request ('POST ' , $ this ->getApiUrl () . 'string ' , [
263
- 'auth ' => $ this ->getAuthentication (),
262
+ $ res = $ client ->request ('POST ' , $ this ->getApiUrl (). 'string ' , [
263
+ 'auth ' => $ this ->getAuthentication (),
264
264
'form_params ' => [
265
265
'platform ' => $ platform ,
266
266
'category ' => $ category ,
267
- 'key ' => $ name ,
268
- 'value ' => $ string ,
269
- 'comment ' => $ comment ,
267
+ 'key ' => $ name ,
268
+ 'value ' => $ string ,
269
+ 'comment ' => $ comment ,
270
270
],
271
271
]);
272
272
0 commit comments