Completed
Push — master ( 5c9589...9e2e66 )
by Levan
37s queued 18s
created
src/GoogleTranslate.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -64,15 +64,15 @@  discard block
 block discarded – undo
64 64
         'client'   => 'gtx',
65 65
         'hl'       => 'en',
66 66
         'dt'       => [
67
-            't',   // Translate
68
-            'bd',  // Full translate with synonym ($bodyArray[1])
69
-            'at',  // Other translate ($bodyArray[5] - in google translate page this shows when click on translated word)
70
-            'ex',  // Example part ($bodyArray[13])
71
-            'ld',  // I don't know ($bodyArray[8])
72
-            'md',  // Definition part with example ($bodyArray[12])
67
+            't', // Translate
68
+            'bd', // Full translate with synonym ($bodyArray[1])
69
+            'at', // Other translate ($bodyArray[5] - in google translate page this shows when click on translated word)
70
+            'ex', // Example part ($bodyArray[13])
71
+            'ld', // I don't know ($bodyArray[8])
72
+            'md', // Definition part with example ($bodyArray[12])
73 73
             'qca', // I don't know ($bodyArray[8])
74
-            'rw',  // Read also part ($bodyArray[14])
75
-            'rm',  // I don't know
74
+            'rw', // Read also part ($bodyArray[14])
75
+            'rm', // I don't know
76 76
             'ss'   // Full synonym ($bodyArray[11])
77 77
         ],
78 78
         'sl'       => null, // Source language
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
         if (is_string($responseArray)) {
296 296
             $output = $responseArray;
297 297
         } elseif (is_array($responseArray[0])) {
298
-            $output = (string) array_reduce($responseArray[0], static function ($carry, $item) {
298
+            $output = (string) array_reduce($responseArray[0], static function($carry, $item) {
299 299
                 $carry .= $item[0];
300 300
                 return $carry;
301 301
             });
@@ -337,12 +337,12 @@  discard block
 block discarded – undo
337 337
         // Replace all matches of our pattern with ${\d} for replacement later
338 338
         return preg_replace_callback(
339 339
             $this->pattern,
340
-            function ($matches) {
340
+            function($matches) {
341 341
                 static $index = -1;
342 342
 
343 343
                 $index++;
344 344
 
345
-                return '${' . $index . '}';
345
+                return '${'.$index.'}';
346 346
             },
347 347
             $string
348 348
         );
Please login to merge, or discard this patch.