@@ -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 | |
@@ -183,6 +183,6 @@ discard block |
||
| 183 | 183 | { |
| 184 | 184 | $response = $this->performQuery('sites/delete', ['id' => $siteID]); |
| 185 | 185 | |
| 186 | - return (int)$response['Result']['Id']; |
|
| 186 | + return (int) $response['Result']['Id']; |
|
| 187 | 187 | } |
| 188 | 188 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $bulkJobs = collect($response['Result']); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - return $bulkJobs->transform(function ($job, $key) { |
|
| 37 | + return $bulkJobs->transform(function($job, $key) { |
|
| 38 | 38 | return new StatBulkJob([ |
| 39 | 39 | 'id' => $job['Id'], |
| 40 | 40 | 'job_type' => $job['JobType'], |
@@ -68,11 +68,11 @@ discard block |
||
| 68 | 68 | $arguments['currently_tracked_only'] = $currentlyTrackedOnly; |
| 69 | 69 | $arguments['crawled_keywords_only'] = $crawledKeywordsOnly; |
| 70 | 70 | |
| 71 | - if (! is_null($sites) && count($sites) > 0) { |
|
| 71 | + if (!is_null($sites) && count($sites) > 0) { |
|
| 72 | 72 | $arguments['site_id'] = implode(',', $sites); |
| 73 | 73 | ; |
| 74 | 74 | } |
| 75 | - if (! is_null($engines) && count($engines) > 0) { |
|
| 75 | + if (!is_null($engines) && count($engines) > 0) { |
|
| 76 | 76 | $arguments['engines'] = implode(',', $engines); |
| 77 | 77 | } |
| 78 | 78 | $response = $this->performQuery('bulk/ranks', $arguments); |
@@ -93,8 +93,8 @@ discard block |
||
| 93 | 93 | $jobStatus->sites = collect(); |
| 94 | 94 | if (isset($response['Result']['SiteId'])) { |
| 95 | 95 | $jobStatus->sites = collect(explode(',', $response['Result']['SiteId'])) |
| 96 | - ->transform(function ($site, $key) { |
|
| 97 | - return (int)$site; |
|
| 96 | + ->transform(function($site, $key) { |
|
| 97 | + return (int) $site; |
|
| 98 | 98 | }); |
| 99 | 99 | } |
| 100 | 100 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | { |
| 112 | 112 | $response = $this->performQuery('bulk/delete', ['id' => $bulkJobID]); |
| 113 | 113 | |
| 114 | - return (int)$response['Result']['Id']; |
|
| 114 | + return (int) $response['Result']['Id']; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | public function siteRankingDistributions($date) |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $this->validateBulkDate($date); |
| 120 | 120 | |
| 121 | 121 | $response = $this->performQuery('bulk/site_ranking_distributions', ['date' => $date->toDateString()]); |
| 122 | - return (int)$response['Result']['Id']; |
|
| 122 | + return (int) $response['Result']['Id']; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | public function tagRankingDistributions($date) |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | { |
| 160 | 160 | $projects = $this->getCollection($bulkStream['Project']); |
| 161 | 161 | |
| 162 | - $projects->transform(function ($project, $key) { |
|
| 162 | + $projects->transform(function($project, $key) { |
|
| 163 | 163 | return $this->transformProject($project); |
| 164 | 164 | }); |
| 165 | 165 | |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | if ($project['TotalSites'] > 1) { |
| 184 | 184 | $transformedProject->sites = collect($project['Site']); |
| 185 | 185 | } |
| 186 | - $transformedProject->sites->transform(function ($site, $key) { |
|
| 186 | + $transformedProject->sites->transform(function($site, $key) { |
|
| 187 | 187 | return $this->transformSite($site); |
| 188 | 188 | }); |
| 189 | 189 | |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | $transformedSite->created_at = $site['CreatedAt']; |
| 201 | 201 | |
| 202 | 202 | if (array_key_exists('Keyword', $site)) { |
| 203 | - $transformedSite->keywords = collect($site['Keyword'])->transform(function ($keyword, $key) { |
|
| 203 | + $transformedSite->keywords = collect($site['Keyword'])->transform(function($keyword, $key) { |
|
| 204 | 204 | return $this->transformKeyword($keyword); |
| 205 | 205 | }); |
| 206 | 206 | } |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | if (array_key_exists('Tag', $site)) { |
| 213 | - $transformedSite->tags = $this->getCollection($site['Tag'])->transform(function ($tag, $key) { |
|
| 213 | + $transformedSite->tags = $this->getCollection($site['Tag'])->transform(function($tag, $key) { |
|
| 214 | 214 | return $this->transformTag($tag); |
| 215 | 215 | }); |
| 216 | 216 | } |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | if (is_null($keyword['KeywordStats'])) { |
| 239 | 239 | $modifiedKeyword->keyword_stats = null; |
| 240 | 240 | } else { |
| 241 | - $localTrends = collect($keyword['KeywordStats']['LocalSearchTrendsByMonth'])->map(function ($searchVolume, $month) { |
|
| 241 | + $localTrends = collect($keyword['KeywordStats']['LocalSearchTrendsByMonth'])->map(function($searchVolume, $month) { |
|
| 242 | 242 | return new StatLocalSearchTrend([ |
| 243 | 243 | 'month' => strtolower($month), |
| 244 | 244 | 'search_volume' => ($searchVolume == '-') ? null : $searchVolume, |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | |
| 289 | 289 | $rankings = $this->getCollection($rankingForEngine['Result'], 'Rank'); |
| 290 | 290 | |
| 291 | - $rankings->transform(function ($ranking, $key) { |
|
| 291 | + $rankings->transform(function($ranking, $key) { |
|
| 292 | 292 | return $this->transformRanking($ranking); |
| 293 | 293 | }); |
| 294 | 294 | |