@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | { |
| 22 | 22 | $this->client = $client; |
| 23 | 23 | |
| 24 | - if(filter_var($endpoint, FILTER_VALIDATE_URL)) { |
|
| 24 | + if (filter_var($endpoint, FILTER_VALIDATE_URL)) { |
|
| 25 | 25 | $this->endpoint = $endpoint; |
| 26 | 26 | } |
| 27 | 27 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function call($path, array $params = array(), array $options = array(), $isAuthRequired = false, $returnArray = false) |
| 42 | 42 | { |
| 43 | - if($options['user-agent'] == '') { |
|
| 43 | + if ($options['user-agent'] == '') { |
|
| 44 | 44 | throw new Exception('You must set a valid User Agent before accessing the MusicBrainz API'); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -17,8 +17,7 @@ discard block |
||
| 17 | 17 | * @param ClientInterface $client |
| 18 | 18 | * @param null $endpoint |
| 19 | 19 | */ |
| 20 | - public function __client(ClientInterface $client, $endpoint = null) |
|
| 21 | - { |
|
| 20 | + public function __client(ClientInterface $client, $endpoint = null) { |
|
| 22 | 21 | $this->client = $client; |
| 23 | 22 | |
| 24 | 23 | if(filter_var($endpoint, FILTER_VALIDATE_URL)) { |
@@ -38,8 +37,7 @@ discard block |
||
| 38 | 37 | * @throws Exception |
| 39 | 38 | * @return array |
| 40 | 39 | */ |
| 41 | - public function call($path, array $params = array(), array $options = array(), $isAuthRequired = false, $returnArray = false) |
|
| 42 | - { |
|
| 40 | + public function call($path, array $params = array(), array $options = array(), $isAuthRequired = false, $returnArray = false) { |
|
| 43 | 41 | if($options['user-agent'] == '') { |
| 44 | 42 | throw new Exception('You must set a valid User Agent before accessing the MusicBrainz API'); |
| 45 | 43 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * @param ClientInterface $client |
| 18 | 18 | * @param null $endpoint |
| 19 | 19 | */ |
| 20 | - public function __client(ClientInterface $client, $endpoint = null) |
|
| 20 | + public function __client(ClientInterface $client, $endpoint = NULL) |
|
| 21 | 21 | { |
| 22 | 22 | $this->client = $client; |
| 23 | 23 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * @throws Exception |
| 39 | 39 | * @return array |
| 40 | 40 | */ |
| 41 | - public function call($path, array $params = array(), array $options = array(), $isAuthRequired = false, $returnArray = false) |
|
| 41 | + public function call($path, array $params = array(), array $options = array(), $isAuthRequired = FALSE, $returnArray = FALSE) |
|
| 42 | 42 | { |
| 43 | 43 | if($options['user-agent'] == '') { |
| 44 | 44 | throw new Exception('You must set a valid User Agent before accessing the MusicBrainz API'); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | ]; |
| 53 | 53 | |
| 54 | 54 | if ($isAuthRequired) { |
| 55 | - if ($options['user'] != null && $options['password'] != null) { |
|
| 55 | + if ($options['user'] != NULL && $options['password'] != NULL) { |
|
| 56 | 56 | $requestOptions['auth'] = [ |
| 57 | 57 | 'username' => $options['user'], |
| 58 | 58 | 'password' => $options['password'], |