@@ -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()); |
@@ -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 |
@@ -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 | } |