@@ -3,8 +3,6 @@ |
||
3 | 3 | namespace SchulzeFelix\Stat\Api; |
4 | 4 | |
5 | 5 | use Carbon\Carbon; |
6 | -use Illuminate\Support\Collection; |
|
7 | -use Illuminate\Support\Facades\Cache; |
|
8 | 6 | use SchulzeFelix\Stat\Exceptions\ApiException; |
9 | 7 | use SchulzeFelix\Stat\Objects\StatBulkJob; |
10 | 8 | use SchulzeFelix\Stat\Objects\StatKeyword; |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace SchulzeFelix\Stat\Api; |
4 | 4 | |
5 | -use Carbon\Carbon; |
|
6 | 5 | use Illuminate\Support\Collection; |
7 | 6 | use SchulzeFelix\Stat\Objects\StatKeyword; |
8 | 7 | use SchulzeFelix\Stat\Objects\StatKeywordEngineRanking; |
@@ -69,11 +69,13 @@ |
||
69 | 69 | return str_replace(',', '\,', $el); |
70 | 70 | }, $keywords)); |
71 | 71 | |
72 | - if( ! is_null($tags) && count($tags) > 0) |
|
73 | - $arguments['tag'] = implode(',', $tags); |
|
72 | + if( ! is_null($tags) && count($tags) > 0) { |
|
73 | + $arguments['tag'] = implode(',', $tags); |
|
74 | + } |
|
74 | 75 | |
75 | - if( ! is_null($location) && $location != '') |
|
76 | - $arguments['location'] = $location; |
|
76 | + if( ! is_null($location) && $location != '') { |
|
77 | + $arguments['location'] = $location; |
|
78 | + } |
|
77 | 79 | |
78 | 80 | $response = $this->performQuery('keywords/create', $arguments); |
79 | 81 |
@@ -2,9 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace SchulzeFelix\Stat\Api; |
4 | 4 | |
5 | -use Carbon\Carbon; |
|
6 | 5 | use Illuminate\Support\Collection; |
7 | -use Illuminate\Support\Facades\Cache; |
|
8 | 6 | use SchulzeFelix\Stat\Objects\StatProject; |
9 | 7 | use SchulzeFelix\Stat\Stat; |
10 | 8 |
@@ -2,8 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace SchulzeFelix\Stat\Api; |
4 | 4 | |
5 | -use Carbon\Carbon; |
|
6 | -use Carbon\CarbonInterval; |
|
7 | 5 | use Illuminate\Support\Collection; |
8 | 6 | use SchulzeFelix\Stat\Objects\StatSubAccount; |
9 | 7 |
@@ -36,8 +36,7 @@ |
||
36 | 36 | try |
37 | 37 | { |
38 | 38 | $response = $this->statClient->performQuery($method, $parameters); |
39 | - } |
|
40 | - catch(ClientException $e) |
|
39 | + } catch(ClientException $e) |
|
41 | 40 | { |
42 | 41 | $xml = simplexml_load_string($e->getResponse()->getBody()->getContents()); |
43 | 42 | throw ApiException::requestException($xml->__toString()); |
@@ -74,8 +74,7 @@ discard block |
||
74 | 74 | try |
75 | 75 | { |
76 | 76 | $this->statClient->performQuery('projects/list', []); |
77 | - } |
|
78 | - catch(ClientException $e) |
|
77 | + } catch(ClientException $e) |
|
79 | 78 | { |
80 | 79 | $now = Carbon::now(); |
81 | 80 | try |
@@ -84,8 +83,7 @@ discard block |
||
84 | 83 | preg_match("/(\d{1,2}) hours and (\d{1,2}) minutes/", $e->getResponse()->getBody()->getContents(), $matches); |
85 | 84 | return $now->addHours($matches[1])->addMinutes($matches[2]); |
86 | 85 | } |
87 | - } |
|
88 | - catch(\Exception $e) |
|
86 | + } catch(\Exception $e) |
|
89 | 87 | { |
90 | 88 | // |
91 | 89 | } |