@@ -9,7 +9,7 @@ |
||
| 9 | 9 | - 'userRateLimitExceeded': The per-user limit from the Developer Console has been reached. |
| 10 | 10 | - 'userRateLimitExceededUnreg': Limit when unregistered |
| 11 | 11 | - More? |
| 12 | - */ |
|
| 12 | + */ |
|
| 13 | 13 | private $reason; |
| 14 | 14 | |
| 15 | 15 | public function __construct($message, $reason) |
@@ -31,10 +31,10 @@ |
||
| 31 | 31 | { |
| 32 | 32 | $app = $this->app; |
| 33 | 33 | $this->mergeConfigFrom( |
| 34 | - __DIR__.'/../config/config.php', |
|
| 34 | + __DIR__ . '/../config/config.php', |
|
| 35 | 35 | 'googlebooks' |
| 36 | 36 | ); |
| 37 | - $this->app->singleton('googlebooks', function ($app) { |
|
| 37 | + $this->app->singleton('googlebooks', function($app) { |
|
| 38 | 38 | $options = []; |
| 39 | 39 | $options['key'] = $app['config']->get('googlebooks.key'); |
| 40 | 40 | $options['country'] = $app['config']->get('googlebooks.country'); |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | $this->maxResults = isset($options['maxResults']) ? $options['maxResults'] : null; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - protected function raw($endpoint, $params = [], $method='GET') |
|
| 73 | + protected function raw($endpoint, $params = [], $method = 'GET') |
|
| 74 | 74 | { |
| 75 | 75 | if (!is_null($this->key)) { |
| 76 | 76 | $params['key'] = $this->key; |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * @param $query |
| 17 | - * @return \Generator|Volume |
|
| 17 | + * @return \Generator |
|
| 18 | 18 | */ |
| 19 | 19 | public function search($query) |
| 20 | 20 | { |
@@ -23,6 +23,9 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | + /** |
|
| 27 | + * @param string $query |
|
| 28 | + */ |
|
| 26 | 29 | public function firstOrNull($query) |
| 27 | 30 | { |
| 28 | 31 | $res = $this->search($query)->current(); |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | * @param string $preferredSize |
| 32 | 32 | * @return mixed|null |
| 33 | 33 | */ |
| 34 | - public function getCover($preferredSize='extraLarge') |
|
| 34 | + public function getCover($preferredSize = 'extraLarge') |
|
| 35 | 35 | { |
| 36 | 36 | $url = null; |
| 37 | 37 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | * |
| 55 | 55 | * @param string $key |
| 56 | 56 | * @param mixed $default |
| 57 | - * @return mixed |
|
| 57 | + * @return string |
|
| 58 | 58 | */ |
| 59 | 59 | public function get($key, $default = null) |
| 60 | 60 | { |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * Check if an item or items exist in an array using "dot" notation. |
| 73 | 73 | * |
| 74 | 74 | * @param string $key |
| 75 | - * @return mixed |
|
| 75 | + * @return boolean |
|
| 76 | 76 | */ |
| 77 | 77 | public function has($key) |
| 78 | 78 | { |