@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | $access_token = json_decode($response->getBody()->getContents())->access_token; |
| 39 | 39 | |
| 40 | - if(!empty($access_token)) { |
|
| 40 | + if (!empty($access_token)) { |
|
| 41 | 41 | return $access_token; |
| 42 | 42 | } |
| 43 | 43 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | function prepareUri($resource) : string |
| 64 | 64 | { |
| 65 | - $uri = $this->api_url . '/' . $resource . $this->apiResponseFormat; |
|
| 65 | + $uri = $this->api_url.'/'.$resource.$this->apiResponseFormat; |
|
| 66 | 66 | |
| 67 | 67 | return $uri; |
| 68 | 68 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | { |
| 77 | 77 | $response = $this->guzzleClient->get($this->prepareUri('stations'), [ |
| 78 | 78 | 'headers' => [ |
| 79 | - 'Authorization' => 'Bearer ' . $this->getAccessToken(), |
|
| 79 | + 'Authorization' => 'Bearer '.$this->getAccessToken(), |
|
| 80 | 80 | ] |
| 81 | 81 | ]); |
| 82 | 82 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | { |
| 101 | 101 | $response = $this->guzzleClient->get($this->prepareUri('stations/status'), [ |
| 102 | 102 | 'headers' => [ |
| 103 | - 'Authorization' => 'Bearer ' . $this->getAccessToken(), |
|
| 103 | + 'Authorization' => 'Bearer '.$this->getAccessToken(), |
|
| 104 | 104 | ] |
| 105 | 105 | ]); |
| 106 | 106 | |
@@ -11,11 +11,11 @@ |
||
| 11 | 11 | $this->veloClient = $veloClient; |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | - public function stations(){ |
|
| 14 | + public function stations() { |
|
| 15 | 15 | return $this->veloClient->fetchStations(); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | - public function stationsStatuses(){ |
|
| 18 | + public function stationsStatuses() { |
|
| 19 | 19 | return $this->veloClient->fetchStationsStatuses(); |
| 20 | 20 | } |
| 21 | 21 | } |
| 22 | 22 | \ No newline at end of file |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | $this->mergeConfigFrom(__DIR__.'/../config/laravel-velo-api.php', 'laravel-velo-api'); |
| 22 | 22 | |
| 23 | - $this->app->bind('velo-api', function () { |
|
| 23 | + $this->app->bind('velo-api', function() { |
|
| 24 | 24 | return new Velo(new VeloClient()); |
| 25 | 25 | }); |
| 26 | 26 | } |
@@ -5,9 +5,9 @@ |
||
| 5 | 5 | { |
| 6 | 6 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
| 7 | 7 | if (php_sapi_name() == 'cli') { |
| 8 | - print_r("\e[1;30m dumped at: " . str_replace(base_path(), '', $trace[0]['file']). ", line: " . $trace[0]['line'] . "\e[40m\n"); |
|
| 8 | + print_r("\e[1;30m dumped at: ".str_replace(base_path(), '', $trace[0]['file']).", line: ".$trace[0]['line']."\e[40m\n"); |
|
| 9 | 9 | } else { |
| 10 | - print_r("[dumped at: " . str_replace(base_path(), '', $trace[0]['file']). ", line: " . $trace[0]['line'] . "]\n"); |
|
| 10 | + print_r("[dumped at: ".str_replace(base_path(), '', $trace[0]['file']).", line: ".$trace[0]['line']."]\n"); |
|
| 11 | 11 | } |
| 12 | 12 | return dd($var, ...$moreVars); |
| 13 | 13 | } |