Completed
Push — master ( f9c442...449dc5 )
by Felix
06:12 queued 03:31
created
src/StatServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     public function boot()
16 16
     {
17 17
         $this->publishes([
18
-            __DIR__.'/config/laravel-stat-search-analytics.php' => config_path('laravel-stat-search-analytics.php'),
18
+            __DIR__ . '/config/laravel-stat-search-analytics.php' => config_path('laravel-stat-search-analytics.php'),
19 19
         ], 'config');
20 20
     }
21 21
 
@@ -26,18 +26,18 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function register()
28 28
     {
29
-        $this->mergeConfigFrom(__DIR__.'/config/laravel-stat-search-analytics.php', 'laravel-stat-search-analytics');
29
+        $this->mergeConfigFrom(__DIR__ . '/config/laravel-stat-search-analytics.php', 'laravel-stat-search-analytics');
30 30
 
31 31
         $statConfig = config('laravel-stat-search-analytics');
32 32
 
33
-        $this->app->bind(StatClient::class, function () use ($statConfig) {
33
+        $this->app->bind(StatClient::class, function() use ($statConfig) {
34 34
             if (empty($statConfig['key'])) {
35 35
                 throw InvalidConfiguration::keyNotSpecified();
36 36
             }
37 37
             return StatClientFactory::createForConfig($statConfig);
38 38
         });
39 39
 
40
-        $this->app->bind(Stat::class, function () {
40
+        $this->app->bind(Stat::class, function() {
41 41
             $client = app(StatClient::class);
42 42
             return new Stat($client);
43 43
         });
Please login to merge, or discard this patch.
src/Api/StatProjects.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         $response = $this->performQuery('projects/list');
20 20
 
21
-        $projects = collect($response['Result'])->map(function ($project, $key) {
21
+        $projects = collect($response['Result'])->map(function($project, $key) {
22 22
             return new StatProject([
23 23
                 'id' => $project['Id'],
24 24
                 'name' => $project['Name'],
Please login to merge, or discard this patch.
src/Api/StatSerps.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     {
20 20
         $response = $this->performQuery('serps/show', ['keyword_id' => $keywordID, 'engine' => $engine, 'date' => $date->toDateString()]);
21 21
 
22
-        return collect($response['Result'])->transform(function ($ranking, $key) {
22
+        return collect($response['Result'])->transform(function($ranking, $key) {
23 23
 
24 24
             return new StatSerpItem([
25 25
                 'result_type' => $ranking['ResultType'],
Please login to merge, or discard this patch.
src/Api/BaseStat.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
     protected function checkMaximumDateRange(Carbon $fromDate, Carbon $toDate, $maxDays = 31)
57 57
     {
58 58
         if ($fromDate->diffInDays($toDate) > $maxDays) {
59
-            throw ApiException::resultError('The maximum date range between from_date and to_date is '.$maxDays.' days.');
59
+            throw ApiException::resultError('The maximum date range between from_date and to_date is ' . $maxDays . ' days.');
60 60
         }
61 61
     }
62 62
 
Please login to merge, or discard this patch.
src/Api/StatRankings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         } while ($response['resultsreturned'] < $response['totalresults']);
38 38
 
39 39
 
40
-        $rankings = $rankings->transform(function ($ranking, $key) {
40
+        $rankings = $rankings->transform(function($ranking, $key) {
41 41
             return new StatKeywordRanking([
42 42
                 'date' => $ranking['date'],
43 43
                 'google' => new StatKeywordEngineRanking([
Please login to merge, or discard this patch.
src/Api/StatKeywords.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         $keywords = collect();
23 23
 
24 24
         do {
25
-            $response = $this->performQuery('keywords/list', ['site_id' => $siteID, 'start' => $start, 'results' => 5000 ]);
25
+            $response = $this->performQuery('keywords/list', ['site_id' => $siteID, 'start' => $start, 'results' => 5000]);
26 26
             $start += 5000;
27 27
 
28 28
             if ($response['totalresults'] == 0) {
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         } while ($response['resultsreturned'] < $response['totalresults']);
42 42
 
43 43
 
44
-        $keywords = $keywords->transform(function ($keyword, $key) {
44
+        $keywords = $keywords->transform(function($keyword, $key) {
45 45
             return $this->transformListedKeyword($keyword);
46 46
         });
47 47
 
@@ -63,15 +63,15 @@  discard block
 block discarded – undo
63 63
         $arguments['market'] = $market;
64 64
         $arguments['device'] = $device;
65 65
         $arguments['type'] = 'regular';
66
-        $arguments['keyword'] = implode(',', array_map(function ($el) {
66
+        $arguments['keyword'] = implode(',', array_map(function($el) {
67 67
             return str_replace(',', '\,', $el);
68 68
         }, $keywords));
69 69
 
70
-        if (! is_null($tags) && count($tags) > 0) {
70
+        if (!is_null($tags) && count($tags) > 0) {
71 71
             $arguments['tag'] = implode(',', $tags);
72 72
         }
73 73
 
74
-        if (! is_null($location) && $location != '') {
74
+        if (!is_null($location) && $location != '') {
75 75
             $arguments['location'] = $location;
76 76
         }
77 77
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             $keywords = collect($response['Result']);
89 89
         }
90 90
 
91
-        return $keywords->transform(function ($keyword, $key) {
91
+        return $keywords->transform(function($keyword, $key) {
92 92
             return $this->transformCreatedKeyword($keyword);
93 93
         });
94 94
     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         }
113 113
 
114 114
 
115
-        return collect($response['Result'])->transform(function ($keywordID, $key) {
115
+        return collect($response['Result'])->transform(function($keywordID, $key) {
116 116
             return $keywordID['Id'];
117 117
         });
118 118
     }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         if (is_null($keyword['KeywordStats'])) {
159 159
             $modifiedKeyword->keyword_stats = null;
160 160
         } else {
161
-            $localTrends = collect($keyword['KeywordStats']['LocalSearchTrendsByMonth'])->map(function ($searchVolume, $month) {
161
+            $localTrends = collect($keyword['KeywordStats']['LocalSearchTrendsByMonth'])->map(function($searchVolume, $month) {
162 162
                 return new StatLocalSearchTrend([
163 163
                     'month' => strtolower($month),
164 164
                     'search_volume' => ($searchVolume == '-') ? null : $searchVolume,
Please login to merge, or discard this patch.
src/Api/StatTags.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
             return collect();
22 22
         }
23 23
 
24
-        $tags = collect($response['Result'])->transform(function ($item, $key) {
24
+        $tags = collect($response['Result'])->transform(function($item, $key) {
25 25
             if ($item['Keywords'] == 'none') {
26 26
                 $item['Keywords'] = collect();
27 27
             } else {
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             $rankDistribution = collect([$response['RankDistribution']]);
58 58
         }
59 59
 
60
-        $rankDistribution->transform(function ($distribution, $key) {
60
+        $rankDistribution->transform(function($distribution, $key) {
61 61
             return $this->transformRankDistribution($distribution);
62 62
         });
63 63
 
Please login to merge, or discard this patch.
src/Api/StatSubAccounts.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
         $subaccounts = collect();
21 21
 
22
-        if (! isset($response['User'])) {
22
+        if (!isset($response['User'])) {
23 23
             return $subaccounts;
24 24
         }
25 25
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
             $subaccounts = collect($response['User']);
30 30
         }
31 31
 
32
-        $subaccounts->transform(function ($item, $key) {
32
+        $subaccounts->transform(function($item, $key) {
33 33
             return new StatSubAccount([
34 34
                 'id' => $item['Id'],
35 35
                 'login' => $item['Login'],
Please login to merge, or discard this patch.
src/Api/StatSites.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         } while ($response['resultsreturned'] < $response['totalresults']);
29 29
 
30 30
 
31
-        $sites->transform(function ($site, $key) {
31
+        $sites->transform(function($site, $key) {
32 32
             return new StatSite([
33 33
                 'id' => $site['Id'],
34 34
                 'project_id' => $site['ProjectId'],
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             $sites = collect($response['Result']);
68 68
         }
69 69
 
70
-        $sites->transform(function ($site, $key) use ($projectID) {
70
+        $sites->transform(function($site, $key) use ($projectID) {
71 71
             return new StatSite([
72 72
                 'id' => $site['Id'],
73 73
                 'project_id' => $projectID,
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             $rankDistribution = collect([$response['RankDistribution']]);
104 104
         }
105 105
 
106
-        $rankDistribution->transform(function ($distribution, $key) {
106
+        $rankDistribution->transform(function($distribution, $key) {
107 107
             return $this->transformRankDistribution($distribution);
108 108
         });
109 109
 
Please login to merge, or discard this patch.