Passed
Push — master ( a20678...43d04b )
by Alexey
09:24 queued 11s
created
src/Scraper/AppInfoScraper.php 2 patches
Spacing   +7 added lines, -9 removed lines patch added patch discarded remove patch
@@ -68,12 +68,12 @@  discard block
 block discarded – undo
68 68
         if (isset($scriptDataInfo[0][12][13][0][0])) {
69 69
             $category = $this->extractCategory($scriptDataInfo[0][12][13][0]);
70 70
         }
71
-        elseif (!empty($data[0][12][13][25])){
71
+        elseif (!empty($data[0][12][13][25])) {
72 72
             $genreId = (string) $data[0][12][13][25];
73
-            $genreName = ucwords(strtolower(str_replace(['_', 'AND'],[' ', '&'], $genreId)));
73
+            $genreName = ucwords(strtolower(str_replace(['_', 'AND'], [' ', '&'], $genreId)));
74 74
             $category = new Category($genreId, $genreName);
75 75
         }
76
-        else{
76
+        else {
77 77
             throw new GooglePlayException('No data to create object '.Category::class);
78 78
         }
79 79
         $summary = $this->extractSummary($scriptDataInfo);
@@ -224,8 +224,7 @@  discard block
 block discarded – undo
224 224
             LocaleHelper::findPreferredLanguage(
225 225
                 $locale,
226 226
                 $scriptDataInfo[0][19][1]
227
-            ) :
228
-            null;
227
+            ) : null;
229 228
     }
230 229
 
231 230
     /**
@@ -261,7 +260,7 @@  discard block
 block discarded – undo
261 260
      */
262 261
     private function extractDeveloper(array $scriptDataInfo): Developer
263 262
     {
264
-        $developerPage = GPlayApps::GOOGLE_PLAY_URL . $scriptDataInfo[0][12][5][5][4][2];
263
+        $developerPage = GPlayApps::GOOGLE_PLAY_URL.$scriptDataInfo[0][12][5][5][4][2];
265 264
         $developerId = parse_query(parse_url($developerPage, \PHP_URL_QUERY))[GPlayApps::REQ_PARAM_ID];
266 265
         $developerName = $scriptDataInfo[0][12][5][1];
267 266
         $developerEmail = $scriptDataInfo[0][12][5][2][0] ?? null;
@@ -321,8 +320,7 @@  discard block
 block discarded – undo
321 320
     protected function extractPrice(array $scriptDataPrice): ?float
322 321
     {
323 322
         return isset($scriptDataPrice[0][2][0][0][0][1][0][0]) ?
324
-            (float) ($scriptDataPrice[0][2][0][0][0][1][0][0] / 1000000) :
325
-            0.0;
323
+            (float) ($scriptDataPrice[0][2][0][0][0][1][0][0] / 1000000) : 0.0;
326 324
     }
327 325
 
328 326
     /**
@@ -357,7 +355,7 @@  discard block
 block discarded – undo
357 355
     private function extractScreenshots(array $scriptDataInfo): array
358 356
     {
359 357
         return !empty($scriptDataInfo[0][12][0]) ? array_map(
360
-            static function (array $v) {
358
+            static function(array $v) {
361 359
                 return new GoogleImage($v[3][2]);
362 360
             },
363 361
             $scriptDataInfo[0][12][0]
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,13 +67,11 @@
 block discarded – undo
67 67
         $developer = $this->extractDeveloper($scriptDataInfo);
68 68
         if (isset($scriptDataInfo[0][12][13][0][0])) {
69 69
             $category = $this->extractCategory($scriptDataInfo[0][12][13][0]);
70
-        }
71
-        elseif (!empty($data[0][12][13][25])){
70
+        } elseif (!empty($data[0][12][13][25])){
72 71
             $genreId = (string) $data[0][12][13][25];
73 72
             $genreName = ucwords(strtolower(str_replace(['_', 'AND'],[' ', '&'], $genreId)));
74 73
             $category = new Category($genreId, $genreName);
75
-        }
76
-        else{
74
+        } else{
77 75
             throw new GooglePlayException('No data to create object '.Category::class);
78 76
         }
79 77
         $summary = $this->extractSummary($scriptDataInfo);
Please login to merge, or discard this patch.