Passed
Pull Request — master (#11)
by Felix
04:52 queued 02:28
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/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/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/StatKeywords.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/Objects/StatSite.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
 
16 16
     public function setDropWWWPrefixAttribute($value)
17 17
     {
18
-        return $this->attributes['drop_www_prefix'] = (bool)$value;
18
+        return $this->attributes['drop_www_prefix'] = (bool) $value;
19 19
     }
20 20
 
21 21
     public function setDropDirectoriesAttribute($value)
22 22
     {
23
-        return $this->attributes['drop_directories'] = (bool)$value;
23
+        return $this->attributes['drop_directories'] = (bool) $value;
24 24
     }
25 25
 }
Please login to merge, or discard this patch.
src/Objects/StatLocalSearchTrend.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,6 +10,6 @@
 block discarded – undo
10 10
 
11 11
     public function setSearchVolumeAttribute($value)
12 12
     {
13
-        return $this->attributes['search_volume'] = (int)$value;
13
+        return $this->attributes['search_volume'] = (int) $value;
14 14
     }
15 15
 }
Please login to merge, or discard this patch.
src/Api/StatProjects.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
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'],
@@ -74,6 +74,6 @@  discard block
 block discarded – undo
74 74
     {
75 75
         $response = $this->performQuery('projects/delete', ['id' => $id]);
76 76
 
77
-        return (int)$response['Result']['Id'];
77
+        return (int) $response['Result']['Id'];
78 78
     }
79 79
 }
Please login to merge, or discard this patch.