@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | } while ($response['resultsreturned'] < $response['totalresults']); |
| 29 | 29 | |
| 30 | 30 | |
| 31 | - $sites->transform(function ($site) { |
|
| 31 | + $sites->transform(function($site) { |
|
| 32 | 32 | return new StatSite([ |
| 33 | 33 | 'id' => $site['Id'], |
| 34 | 34 | 'project_id' => $site['ProjectId'], |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $sites = collect($response['Result']); |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - $sites->transform(function ($site) use ($projectID) { |
|
| 70 | + $sites->transform(function($site) use ($projectID) { |
|
| 71 | 71 | return new StatSite([ |
| 72 | 72 | 'id' => $site['Id'], |
| 73 | 73 | 'project_id' => $projectID, |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $rankDistribution = collect([$response['RankDistribution']]); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - $rankDistribution->transform(function ($distribution) { |
|
| 106 | + $rankDistribution->transform(function($distribution) { |
|
| 107 | 107 | return $this->transformRankDistribution($distribution); |
| 108 | 108 | }); |
| 109 | 109 | |
@@ -145,19 +145,19 @@ discard block |
||
| 145 | 145 | $arguments = []; |
| 146 | 146 | $arguments['id'] = $siteID; |
| 147 | 147 | |
| 148 | - if(!is_null($title)){ |
|
| 148 | + if (!is_null($title)) { |
|
| 149 | 149 | $arguments['title'] = rawurlencode($title); |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | - if(!is_null($url)){ |
|
| 152 | + if (!is_null($url)) { |
|
| 153 | 153 | $arguments['url'] = rawurlencode($url); |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | - if(!is_null($dropWWWprefix)){ |
|
| 156 | + if (!is_null($dropWWWprefix)) { |
|
| 157 | 157 | $arguments['drop_www_prefix'] = ($dropWWWprefix) ?: 0; |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | - if(!is_null($dropDirectories)){ |
|
| 160 | + if (!is_null($dropDirectories)) { |
|
| 161 | 161 | $arguments['drop_directories'] = ($dropDirectories) ?: 0; |
| 162 | 162 | } |
| 163 | 163 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | $keywords = collect(); |
| 22 | 22 | |
| 23 | 23 | do { |
| 24 | - $response = $this->performQuery('keywords/list', ['site_id' => $siteID, 'start' => $start, 'results' => 5000 ]); |
|
| 24 | + $response = $this->performQuery('keywords/list', ['site_id' => $siteID, 'start' => $start, 'results' => 5000]); |
|
| 25 | 25 | $start += 5000; |
| 26 | 26 | |
| 27 | 27 | if ($response['totalresults'] == 0) { |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | } while ($response['resultsreturned'] < $response['totalresults']); |
| 41 | 41 | |
| 42 | 42 | |
| 43 | - $keywords = $keywords->transform(function ($keyword) { |
|
| 43 | + $keywords = $keywords->transform(function($keyword) { |
|
| 44 | 44 | return $this->transformListedKeyword($keyword); |
| 45 | 45 | }); |
| 46 | 46 | |
@@ -63,15 +63,15 @@ discard block |
||
| 63 | 63 | $arguments['device'] = $device; |
| 64 | 64 | $arguments['type'] = 'regular'; |
| 65 | 65 | |
| 66 | - $keywords = array_map(function ($keyword) { |
|
| 66 | + $keywords = array_map(function($keyword) { |
|
| 67 | 67 | $keyword = str_replace(',', '\,', $keyword); |
| 68 | 68 | $keyword = rawurlencode($keyword); |
| 69 | 69 | return $keyword; |
| 70 | 70 | }, $keywords); |
| 71 | 71 | $arguments['keyword'] = implode(',', $keywords); |
| 72 | 72 | |
| 73 | - if (! is_null($tags) && count($tags) > 0) { |
|
| 74 | - $tags = array_map(function ($tag) { |
|
| 73 | + if (!is_null($tags) && count($tags) > 0) { |
|
| 74 | + $tags = array_map(function($tag) { |
|
| 75 | 75 | $tag = str_replace(',', '-', $tag); |
| 76 | 76 | $tag = rawurlencode($tag); |
| 77 | 77 | return $tag; |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $arguments['tag'] = implode(',', $tags); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - if (! is_null($location) && $location != '') { |
|
| 83 | + if (!is_null($location) && $location != '') { |
|
| 84 | 84 | $arguments['location'] = $location; |
| 85 | 85 | } |
| 86 | 86 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $keywords = collect($response['Result']); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - return $keywords->transform(function ($keyword) { |
|
| 100 | + return $keywords->transform(function($keyword) { |
|
| 101 | 101 | return $this->transformCreatedKeyword($keyword); |
| 102 | 102 | }); |
| 103 | 103 | } |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | |
| 124 | - return collect($response['Result'])->transform(function ($keywordID) { |
|
| 124 | + return collect($response['Result'])->transform(function($keywordID) { |
|
| 125 | 125 | return $keywordID['Id']; |
| 126 | 126 | }); |
| 127 | 127 | } |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | if (is_null($keyword['KeywordStats'])) { |
| 168 | 168 | $modifiedKeyword->keyword_stats = null; |
| 169 | 169 | } else { |
| 170 | - $localTrends = collect($keyword['KeywordStats']['LocalSearchTrendsByMonth'])->map(function ($searchVolume, $month) { |
|
| 170 | + $localTrends = collect($keyword['KeywordStats']['LocalSearchTrendsByMonth'])->map(function($searchVolume, $month) { |
|
| 171 | 171 | return new StatLocalSearchTrend([ |
| 172 | 172 | 'month' => strtolower($month), |
| 173 | 173 | 'search_volume' => ($searchVolume == '-') ? null : $searchVolume, |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | { |
| 16 | 16 | $response = $this->performQuery('projects/list'); |
| 17 | 17 | |
| 18 | - $projects = collect($response['Result'])->map(function ($project) { |
|
| 18 | + $projects = collect($response['Result'])->map(function($project) { |
|
| 19 | 19 | return new StatProject([ |
| 20 | 20 | 'id' => $project['Id'], |
| 21 | 21 | 'name' => $project['Name'], |