@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public function register() |
| 21 | 21 | { |
| 22 | - $this->app->singleton('flickr', function ($app) { |
|
| 22 | + $this->app->singleton('flickr', function($app) { |
|
| 23 | 23 | $api = new Api(env('FLICKR_KEY')); |
| 24 | 24 | |
| 25 | 25 | return new Flickr($api); |
@@ -9,16 +9,14 @@ discard block |
||
| 9 | 9 | /** |
| 10 | 10 | * Perform post-registration booting of services. |
| 11 | 11 | */ |
| 12 | - public function boot() |
|
| 13 | - { |
|
| 12 | + public function boot() { |
|
| 14 | 13 | // |
| 15 | 14 | } |
| 16 | 15 | |
| 17 | 16 | /** |
| 18 | 17 | * Register any package services. |
| 19 | 18 | */ |
| 20 | - public function register() |
|
| 21 | - { |
|
| 19 | + public function register() { |
|
| 22 | 20 | $this->app->singleton('flickr', function ($app) { |
| 23 | 21 | $api = new Api(env('FLICKR_KEY')); |
| 24 | 22 | |
@@ -31,8 +29,7 @@ discard block |
||
| 31 | 29 | * |
| 32 | 30 | * @return array |
| 33 | 31 | */ |
| 34 | - public function provides() |
|
| 35 | - { |
|
| 32 | + public function provides() { |
|
| 36 | 33 | return ['flickr']; |
| 37 | 34 | } |
| 38 | 35 | } |
@@ -35,8 +35,7 @@ discard block |
||
| 35 | 35 | * @param string $endpoint |
| 36 | 36 | * @return void |
| 37 | 37 | */ |
| 38 | - public function __construct($apiKey, $format = 'php_serial', $endpoint = 'https://api.flickr.com/services/rest/') |
|
| 39 | - { |
|
| 38 | + public function __construct($apiKey, $format = 'php_serial', $endpoint = 'https://api.flickr.com/services/rest/') { |
|
| 40 | 39 | $this->key = $apiKey; |
| 41 | 40 | $this->format = $format; |
| 42 | 41 | |
@@ -53,8 +52,7 @@ discard block |
||
| 53 | 52 | * @param array|null $parameters |
| 54 | 53 | * @return \JeroenG\Flickr\Response |
| 55 | 54 | */ |
| 56 | - public function request($call, $parameters = null) |
|
| 57 | - { |
|
| 55 | + public function request($call, $parameters = null) { |
|
| 58 | 56 | $guzzleResponse = $this->client->get($this->api().'&method='.$call.$this->parameters($parameters)); |
| 59 | 57 | |
| 60 | 58 | if ($guzzleResponse->getStatusCode() == 200) { |
@@ -69,8 +67,7 @@ discard block |
||
| 69 | 67 | * |
| 70 | 68 | * @return string |
| 71 | 69 | */ |
| 72 | - protected function api() |
|
| 73 | - { |
|
| 70 | + protected function api() { |
|
| 74 | 71 | return '?api_key='.$this->key.'&format='.$this->format; |
| 75 | 72 | } |
| 76 | 73 | |
@@ -80,8 +77,7 @@ discard block |
||
| 80 | 77 | * @param array $array |
| 81 | 78 | * @return string |
| 82 | 79 | */ |
| 83 | - protected function parameters($array) |
|
| 84 | - { |
|
| 80 | + protected function parameters($array) { |
|
| 85 | 81 | if (! is_array($array)) { |
| 86 | 82 | return; |
| 87 | 83 | } |