Passed
Pull Request — master (#11)
by Felix
04:52 queued 02:28
created
src/Api/StatBilling.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -115,11 +115,11 @@
 block discarded – undo
115 115
         $statBillSummary = new StatBillSummary([
116 116
             'start_date'             => $response['Summary']['StartDate'],
117 117
             'end_date'               => $response['Summary']['EndDate'],
118
-            'min_committed_charge'   => (float)array_get($response, 'Summary.MinCommittedCharge', 0.0),
119
-            'tracked_keywords'       => (int)$response['Summary']['TrackedKeywords'],
120
-            'tracked_keywords_total' => (float)$response['Summary']['TrackedKeywordsTotal'],
121
-            'optional_service_total' => (float)$response['Summary']['OptionalServiceTotal'],
122
-            'total'                  => (float)$response['Summary']['Total'],
118
+            'min_committed_charge'   => (float) array_get($response, 'Summary.MinCommittedCharge', 0.0),
119
+            'tracked_keywords'       => (int) $response['Summary']['TrackedKeywords'],
120
+            'tracked_keywords_total' => (float) $response['Summary']['TrackedKeywordsTotal'],
121
+            'optional_service_total' => (float) $response['Summary']['OptionalServiceTotal'],
122
+            'total'                  => (float) $response['Summary']['Total'],
123 123
         ]);
124 124
 
125 125
         return $statBillSummary;
Please login to merge, or discard this patch.
src/Api/StatBulk.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
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 $this->transformBulkJobStatus($job);
39 39
         });
40 40
     }
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
         $arguments['currently_tracked_only'] = $currentlyTrackedOnly;
60 60
         $arguments['crawled_keywords_only'] = $crawledKeywordsOnly;
61 61
 
62
-        if (! is_null($sites) && count($sites) > 0) {
62
+        if (!is_null($sites) && count($sites) > 0) {
63 63
             $arguments['site_id'] = implode(',', $sites);
64 64
             ;
65 65
         }
66
-        if (! is_null($engines) && count($engines) > 0) {
66
+        if (!is_null($engines) && count($engines) > 0) {
67 67
             $arguments['engines'] = implode(',', $engines);
68 68
         }
69 69
         $response = $this->performQuery('bulk/ranks', $arguments);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     {
83 83
         $response = $this->performQuery('bulk/delete', ['id' => $bulkJobID]);
84 84
 
85
-        return (int)$response['Result']['Id'];
85
+        return (int) $response['Result']['Id'];
86 86
     }
87 87
 
88 88
     public function siteRankingDistributions($date)
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $this->validateBulkDate($date);
91 91
 
92 92
         $response = $this->performQuery('bulk/site_ranking_distributions', ['date' => $date->toDateString()]);
93
-        return (int)$response['Result']['Id'];
93
+        return (int) $response['Result']['Id'];
94 94
     }
95 95
 
96 96
     public function tagRankingDistributions($date)
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     {
131 131
         $projects = $this->getCollection($bulkStream['Project']);
132 132
 
133
-        $projects->transform(function ($project, $key) {
133
+        $projects->transform(function($project, $key) {
134 134
             return $this->transformProject($project);
135 135
         });
136 136
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         if ($project['TotalSites'] > 1) {
155 155
             $transformedProject->sites = collect($project['Site']);
156 156
         }
157
-        $transformedProject->sites->transform(function ($site, $key) {
157
+        $transformedProject->sites->transform(function($site, $key) {
158 158
             return $this->transformSite($site);
159 159
         });
160 160
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         $transformedSite->created_at = $site['CreatedAt'];
172 172
 
173 173
         if (array_key_exists('Keyword', $site)) {
174
-            $transformedSite->keywords = collect($site['Keyword'])->transform(function ($keyword, $key) {
174
+            $transformedSite->keywords = collect($site['Keyword'])->transform(function($keyword, $key) {
175 175
                 return $this->transformKeyword($keyword);
176 176
             });
177 177
         }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         }
182 182
 
183 183
         if (array_key_exists('Tag', $site)) {
184
-            $transformedSite->tags = $this->getCollection($site['Tag'])->transform(function ($tag, $key) {
184
+            $transformedSite->tags = $this->getCollection($site['Tag'])->transform(function($tag, $key) {
185 185
                 return $this->transformTag($tag);
186 186
             });
187 187
         }
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         if (is_null($keyword['KeywordStats'])) {
210 210
             $modifiedKeyword->keyword_stats = null;
211 211
         } else {
212
-            $localTrends = collect($keyword['KeywordStats']['LocalSearchTrendsByMonth'])->map(function ($searchVolume, $month) {
212
+            $localTrends = collect($keyword['KeywordStats']['LocalSearchTrendsByMonth'])->map(function($searchVolume, $month) {
213 213
                 return new StatLocalSearchTrend([
214 214
                     'month' => strtolower($month),
215 215
                     'search_volume' => ($searchVolume == '-') ? null : $searchVolume,
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 
260 260
         $rankings = $this->getCollection($rankingForEngine['Result'], 'Rank');
261 261
 
262
-        $rankings->transform(function ($ranking, $key) {
262
+        $rankings->transform(function($ranking, $key) {
263 263
             return $this->transformRanking($ranking);
264 264
         });
265 265
 
@@ -312,8 +312,8 @@  discard block
 block discarded – undo
312 312
         $bulkJob->sites = collect();
313 313
         if (array_has($job, 'SiteId')) {
314 314
             $bulkJob->sites = collect(explode(',', $job['SiteId']))
315
-                ->transform(function ($site, $key) {
316
-                    return (int)$site;
315
+                ->transform(function($site, $key) {
316
+                    return (int) $site;
317 317
                 });
318 318
         }
319 319
         $bulkJob->status = $job['Status'];
Please login to merge, or discard this patch.