Passed
Branch develop (bc8038)
by Alexey
02:01
created
src/Scraper/AppReviewScraper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
         $doc = new \DOMDocument();
31 31
         $internalErrors = libxml_use_internal_errors(true);
32
-        if (!$doc->loadHTML('<?xml encoding="utf-8" ?>' . $html)) {
32
+        if (!$doc->loadHTML('<?xml encoding="utf-8" ?>'.$html)) {
33 33
             throw new \RuntimeException('error load html');
34 34
         }
35 35
         libxml_use_internal_errors($internalErrors);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                     if ($reviewUrlNode === null) {
59 59
                         continue;
60 60
                     }
61
-                    $reviewUrl = GPlayApps::GOOGLE_PLAY_URL . $reviewUrlNode->item(0)->textContent;
61
+                    $reviewUrl = GPlayApps::GOOGLE_PLAY_URL.$reviewUrlNode->item(0)->textContent;
62 62
                 }
63 63
                 // user name
64 64
                 {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                 if ($ratingStyleAttr !== null) {
99 99
                     $ratingStyle = $ratingStyleAttr->textContent;
100 100
                     if (preg_match('/([\d]+)%/', $ratingStyle, $match)) {
101
-                        $score = (int)($match[1] * 0.05); // percent * 5 star
101
+                        $score = (int) ($match[1] * 0.05); // percent * 5 star
102 102
                     }
103 103
                 }
104 104
             }
Please login to merge, or discard this patch.
src/Scraper/PlayStoreUiPagesScraper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,13 +71,13 @@
 block discarded – undo
71 71
                 'soc-platform' => 1,
72 72
                 'soc-device' => 1,
73 73
             ];
74
-            $playStoreUiUrl = GPlayApps::GOOGLE_PLAY_URL . '/_/PlayStoreUi/data/batchexecute?' . http_build_query($params);
74
+            $playStoreUiUrl = GPlayApps::GOOGLE_PLAY_URL.'/_/PlayStoreUi/data/batchexecute?'.http_build_query($params);
75 75
 
76 76
             $savedApps = [$apps];
77 77
             while ($countApps < $this->limit && $scraper->hasNextToken()) {
78 78
                 $limit = min(100, $this->limit - $countApps);
79 79
                 $body = [
80
-                    'f.req' => '[[["' . self::RPC_ID . '","[[null,[[10,[10,' . $limit . ']],true,null,[1]],null,\\"' . $scraper->getToken() . '\\"]]",null,"generic"]]]',
80
+                    'f.req' => '[[["'.self::RPC_ID.'","[[null,[[10,[10,'.$limit.']],true,null,[1]],null,\\"'.$scraper->getToken().'\\"]]",null,"generic"]]]',
81 81
                 ];
82 82
 
83 83
                 /**
Please login to merge, or discard this patch.
src/Scraper/DeveloperAppsScraper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,11 +40,11 @@
 block discarded – undo
40 40
         if ($developerAppsUrl === null) {
41 41
             return [];
42 42
         }
43
-        $developerAppsUrl = GPlayApps::GOOGLE_PLAY_URL . $developerAppsUrl;
43
+        $developerAppsUrl = GPlayApps::GOOGLE_PLAY_URL.$developerAppsUrl;
44 44
 
45 45
         $developerAppsUrl .=
46
-            '&' . GPlayApps::REQ_PARAM_LOCALE . '=' . urlencode($this->locale) .
47
-            '&' . GPlayApps::REQ_PARAM_COUNTRY . '=' . urlencode($this->country);
46
+            '&'.GPlayApps::REQ_PARAM_LOCALE.'='.urlencode($this->locale).
47
+            '&'.GPlayApps::REQ_PARAM_COUNTRY.'='.urlencode($this->country);
48 48
 
49 49
         $requestSimilar = new Request('GET', $developerAppsUrl);
50 50
         try {
Please login to merge, or discard this patch.
src/Scraper/ListScraper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $doc = new \DOMDocument();
28 28
         $internalErrors = libxml_use_internal_errors(true);
29
-        if (!$doc->loadHTML('<?xml encoding="utf-8" ?>' . $response->getBody()->getContents())) {
29
+        if (!$doc->loadHTML('<?xml encoding="utf-8" ?>'.$response->getBody()->getContents())) {
30 30
             throw new \RuntimeException('error load html');
31 31
         }
32 32
         libxml_use_internal_errors($internalErrors);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
                     throw (new GooglePlayException('Error parse app list'))
50 50
                         ->setUrl($request->getUri()->__toString());
51 51
                 }
52
-                $url = GPlayApps::GOOGLE_PLAY_URL . $nodeTitle->attributes->getNamedItem('href')->textContent;
52
+                $url = GPlayApps::GOOGLE_PLAY_URL.$nodeTitle->attributes->getNamedItem('href')->textContent;
53 53
                 $name = trim($nodeTitle->attributes->getNamedItem('title')->textContent);
54 54
             }
55 55
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                         ->setUrl($request->getUri()->__toString());
69 69
                 }
70 70
                 $developerName = trim($developerNode->textContent);
71
-                $developerUrl = GPlayApps::GOOGLE_PLAY_URL . $developerNode->attributes->getNamedItem('href')->textContent;
71
+                $developerUrl = GPlayApps::GOOGLE_PLAY_URL.$developerNode->attributes->getNamedItem('href')->textContent;
72 72
                 $developerId = parse_query(parse_url($developerUrl, PHP_URL_QUERY))[GPlayApps::REQ_PARAM_APP_ID];
73 73
             }
74 74
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                     throw (new GooglePlayException('Error parse app list icon node'))
79 79
                         ->setUrl($request->getUri()->__toString());
80 80
                 }
81
-                $icon = new GoogleImage('https:' . $iconNode->textContent);
81
+                $icon = new GoogleImage('https:'.$iconNode->textContent);
82 82
                 $icon->reset();
83 83
             }
84 84
 
Please login to merge, or discard this patch.
src/Scraper/CategoriesScraper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@
 block discarded – undo
37 37
                 ->setUrl($request->getUri()->__toString());
38 38
         }
39 39
 
40
-        $parseCategories = static function (array $items) use (&$parseCategories) : array {
41
-            return array_reduce($items, static function ($results, $item) use (&$parseCategories) {
40
+        $parseCategories = static function(array $items) use (&$parseCategories) : array {
41
+            return array_reduce($items, static function($results, $item) use (&$parseCategories) {
42 42
                 if (is_array($item)) {
43 43
                     if (
44 44
                         count($item) === 6 &&
Please login to merge, or discard this patch.
src/Scraper/PlayStoreUiScraper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@
 block discarded – undo
35 35
         foreach ($json[0][0][0] as $data) {
36 36
             $name = $data[2];
37 37
             $appId = $data[12][0];
38
-            $url = GPlayApps::GOOGLE_PLAY_URL . $data[9][4][2];
38
+            $url = GPlayApps::GOOGLE_PLAY_URL.$data[9][4][2];
39 39
             $icon = new GoogleImage($data[1][1][0][3][2]);
40 40
             $developerName = $data[4][0][0][0];
41
-            $developerPage = GPlayApps::GOOGLE_PLAY_URL . $data[4][0][0][1][4][2];
41
+            $developerPage = GPlayApps::GOOGLE_PLAY_URL.$data[4][0][0][1][4][2];
42 42
             $developerId = parse_query(parse_url($developerPage, PHP_URL_QUERY))['id'];
43 43
             $price = $data[7][0][3][2][1][0][2];
44 44
             $summary = $data[4][1][1][1][1];
Please login to merge, or discard this patch.
src/Scraper/PermissionScraper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
         $json = \GuzzleHttp\json_decode($contents, true);
22 22
         $data = $json[0][2][0][65]['42656262'][1] ?? [];
23 23
 
24
-        $parsePermissions = static function (array $items) use (&$parsePermissions) {
25
-            return array_reduce($items, static function ($results, $item) use (&$parsePermissions) {
24
+        $parsePermissions = static function(array $items) use (&$parsePermissions) {
25
+            return array_reduce($items, static function($results, $item) use (&$parsePermissions) {
26 26
                 if (is_array($item)) {
27 27
                     if (count($item) === 3 && is_string($item[0]) && is_string($item[1])) {
28 28
                         $results[] = new Permission($item[0], $item[1]);
Please login to merge, or discard this patch.
src/Scraper/DeveloperPageScraper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
         $urlComponents = parse_url($url);
28 28
         $query = parse_query($urlComponents['query']);
29 29
         $developerId = $query[GPlayApps::REQ_PARAM_APP_ID];
30
-        $url = $urlComponents['scheme'] . '://'
30
+        $url = $urlComponents['scheme'].'://'
31 31
             . $urlComponents['host']
32 32
             . $urlComponents['path']
33
-            . '?' . http_build_query([GPlayApps::REQ_PARAM_APP_ID => $developerId]);
33
+            . '?'.http_build_query([GPlayApps::REQ_PARAM_APP_ID => $developerId]);
34 34
 
35 35
         $scriptData = ScraperUtil::extractScriptData($response->getBody()->getContents());
36 36
 
Please login to merge, or discard this patch.
src/Scraper/SimilarAppsScraper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         $similarAppsUrl = null;
28 28
         foreach ($scriptData as $key => $scriptValue) {
29 29
             if (isset($scriptValue[1][1][0][0][3][4][2])) {
30
-                $similarAppsUrl = GPlayApps::GOOGLE_PLAY_URL . $scriptValue[1][1][0][0][3][4][2];
30
+                $similarAppsUrl = GPlayApps::GOOGLE_PLAY_URL.$scriptValue[1][1][0][0][3][4][2];
31 31
                 break;
32 32
             }
33 33
         }
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
         }
40 40
 
41 41
         $similarAppsUrl .=
42
-            '&' . GPlayApps::REQ_PARAM_LOCALE . '=' . urlencode($this->locale) .
43
-            '&' . GPlayApps::REQ_PARAM_COUNTRY . '=' . urlencode($this->country);
42
+            '&'.GPlayApps::REQ_PARAM_LOCALE.'='.urlencode($this->locale).
43
+            '&'.GPlayApps::REQ_PARAM_COUNTRY.'='.urlencode($this->country);
44 44
 
45 45
         $requestSimilar = new Request('GET', $similarAppsUrl);
46 46
         try {
Please login to merge, or discard this patch.