@@ -48,9 +48,9 @@ |
||
48 | 48 | |
49 | 49 | foreach ($scriptData as $key => $scriptValue) { |
50 | 50 | if (isset($scriptValue[1][1][0][0][3][4][2])) { |
51 | - return GPlayApps::GOOGLE_PLAY_URL . $scriptValue[1][1][0][0][3][4][2] . |
|
52 | - '&' . GPlayApps::REQ_PARAM_LOCALE . '=' . urlencode($this->appId->getLocale()) . |
|
53 | - '&' . GPlayApps::REQ_PARAM_COUNTRY . '=' . urlencode($this->appId->getCountry()); |
|
51 | + return GPlayApps::GOOGLE_PLAY_URL.$scriptValue[1][1][0][0][3][4][2]. |
|
52 | + '&'.GPlayApps::REQ_PARAM_LOCALE.'='.urlencode($this->appId->getLocale()). |
|
53 | + '&'.GPlayApps::REQ_PARAM_COUNTRY.'='.urlencode($this->appId->getCountry()); |
|
54 | 54 | break; |
55 | 55 | } |
56 | 56 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | if (isset($scriptDataApps[0][1][0][0][3][4][2])) { |
54 | - return GPlayApps::GOOGLE_PLAY_URL . $scriptDataApps[0][1][0][0][3][4][2]; |
|
54 | + return GPlayApps::GOOGLE_PLAY_URL.$scriptDataApps[0][1][0][0][3][4][2]; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | return null; |
@@ -214,8 +214,7 @@ discard block |
||
214 | 214 | LocaleHelper::findPreferredLanguage( |
215 | 215 | $locale, |
216 | 216 | $scriptDataInfo[0][19][1] |
217 | - ) : |
|
218 | - null; |
|
217 | + ) : null; |
|
219 | 218 | } |
220 | 219 | |
221 | 220 | /** |
@@ -251,7 +250,7 @@ discard block |
||
251 | 250 | */ |
252 | 251 | private function extractDeveloper(array $scriptDataInfo): Developer |
253 | 252 | { |
254 | - $developerPage = GPlayApps::GOOGLE_PLAY_URL . $scriptDataInfo[0][12][5][5][4][2]; |
|
253 | + $developerPage = GPlayApps::GOOGLE_PLAY_URL.$scriptDataInfo[0][12][5][5][4][2]; |
|
255 | 254 | $developerId = parse_query(parse_url($developerPage, \PHP_URL_QUERY))[GPlayApps::REQ_PARAM_ID]; |
256 | 255 | $developerName = $scriptDataInfo[0][12][5][1]; |
257 | 256 | $developerEmail = $scriptDataInfo[0][12][5][2][0] ?? null; |
@@ -311,8 +310,7 @@ discard block |
||
311 | 310 | protected function extractPrice(array $scriptDataPrice): ?float |
312 | 311 | { |
313 | 312 | return isset($scriptDataPrice[0][2][0][0][0][1][0][0]) ? |
314 | - (float) ($scriptDataPrice[0][2][0][0][0][1][0][0] / 1000000) : |
|
315 | - 0.0; |
|
313 | + (float) ($scriptDataPrice[0][2][0][0][0][1][0][0] / 1000000) : 0.0; |
|
316 | 314 | } |
317 | 315 | |
318 | 316 | /** |
@@ -347,7 +345,7 @@ discard block |
||
347 | 345 | private function extractScreenshots(array $scriptDataInfo): array |
348 | 346 | { |
349 | 347 | return !empty($scriptDataInfo[0][12][0]) ? array_map( |
350 | - static function (array $v) { |
|
348 | + static function(array $v) { |
|
351 | 349 | return new GoogleImage($v[3][2]); |
352 | 350 | }, |
353 | 351 | $scriptDataInfo[0][12][0] |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $json = \GuzzleHttp\json_decode($contents, true); |
35 | 35 | $data = \GuzzleHttp\json_decode($json[0][2], true); |
36 | 36 | |
37 | - $permissionMapFn = static function (array $v): string { |
|
37 | + $permissionMapFn = static function(array $v): string { |
|
38 | 38 | return (string) $v[1]; |
39 | 39 | }; |
40 | 40 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | return array_map( |
68 | - static function (array $data) { |
|
68 | + static function(array $data) { |
|
69 | 69 | return new Permission($data['name'], $data['icon'], $data['permissions']); |
70 | 70 | }, |
71 | 71 | $permissions |
@@ -41,7 +41,7 @@ |
||
41 | 41 | if (isset($a[0][1], $a[0][3][4][2])) { |
42 | 42 | $results[] = [ |
43 | 43 | 'name' => trim($a[0][1]), |
44 | - 'url' => GPlayApps::GOOGLE_PLAY_URL . $a[0][3][4][2], |
|
44 | + 'url' => GPlayApps::GOOGLE_PLAY_URL.$a[0][3][4][2], |
|
45 | 45 | ]; |
46 | 46 | } |
47 | 47 | } |
@@ -52,10 +52,10 @@ |
||
52 | 52 | ; |
53 | 53 | } |
54 | 54 | |
55 | - $parseCategories = static function (array $items) use (&$parseCategories): array { |
|
55 | + $parseCategories = static function(array $items) use (&$parseCategories): array { |
|
56 | 56 | return array_reduce( |
57 | 57 | $items, |
58 | - static function ($results, $item) use (&$parseCategories) { |
|
58 | + static function($results, $item) use (&$parseCategories) { |
|
59 | 59 | if (\is_array($item)) { |
60 | 60 | if ( |
61 | 61 | \count($item) === 6 && |
@@ -62,7 +62,7 @@ |
||
62 | 62 | private static function extractDeveloper(array $data): Developer |
63 | 63 | { |
64 | 64 | $developerName = $data[4][0][0][0]; |
65 | - $developerPage = GPlayApps::GOOGLE_PLAY_URL . $data[4][0][0][1][4][2]; |
|
65 | + $developerPage = GPlayApps::GOOGLE_PLAY_URL.$data[4][0][0][1][4][2]; |
|
66 | 66 | $developerId = parse_query(parse_url($developerPage, \PHP_URL_QUERY))[GPlayApps::REQ_PARAM_ID]; |
67 | 67 | |
68 | 68 | return new Developer( |
@@ -48,7 +48,7 @@ |
||
48 | 48 | public static function extractReview(AppId $requestApp, $reviewData): Review |
49 | 49 | { |
50 | 50 | $reviewId = $reviewData[0]; |
51 | - $reviewUrl = $requestApp->getUrl() . '&reviewId=' . urlencode($reviewId); |
|
51 | + $reviewUrl = $requestApp->getUrl().'&reviewId='.urlencode($reviewId); |
|
52 | 52 | $userName = $reviewData[1][0]; |
53 | 53 | $avatar = (new GoogleImage($reviewData[1][1][3][2]))->setSize(64); |
54 | 54 | $date = DateStringFormatter::unixTimeToDateTime($reviewData[5][0]); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function getUrl(): string |
101 | 101 | { |
102 | - return GPlayApps::GOOGLE_PLAY_APPS_URL . '/details?' . http_build_query( |
|
102 | + return GPlayApps::GOOGLE_PLAY_APPS_URL.'/details?'.http_build_query( |
|
103 | 103 | [ |
104 | 104 | GPlayApps::REQ_PARAM_ID => $this->id, |
105 | 105 | ] |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | public function getFullUrl(): string |
117 | 117 | { |
118 | - return GPlayApps::GOOGLE_PLAY_APPS_URL . '/details?' . http_build_query( |
|
118 | + return GPlayApps::GOOGLE_PLAY_APPS_URL.'/details?'.http_build_query( |
|
119 | 119 | [ |
120 | 120 | GPlayApps::REQ_PARAM_ID => $this->id, |
121 | 121 | GPlayApps::REQ_PARAM_LOCALE => $this->locale, |