1616 */
1717abstract class BaseCurrencyDriver implements CurrencyDriverContract
1818{
19- protected $ apiURL = 'localhost ' ;
20- protected $ protocol = 'http ' ;
21- protected $ headers = [
19+ protected $ apiURL = 'localhost ' ;
20+ protected $ protocol = 'http ' ;
21+ protected $ headers = [
2222 'Accept ' => 'application/json ' ,
2323 'Content-Type ' => 'application/json ' ,
2424 ];
@@ -28,8 +28,8 @@ abstract class BaseCurrencyDriver implements CurrencyDriverContract
2828 protected $ amount = 0.00 ;
2929 protected $ date = null ;
3030
31- protected $ httpClient = null ;
32- protected $ httpParams = [];
31+ protected $ httpClient = null ;
32+ protected $ httpParams = [];
3333
3434 /**
3535 * BaseDriver constructor.
@@ -58,7 +58,7 @@ public function source(string $baseCurrency): CurrencyDriverContract
5858 * @param string $baseCurrency
5959 *
6060 * @return CurrencyDriverContract
61- *@see CurrencyDriverContract::source()
61+ * @see CurrencyDriverContract::source()
6262 *
6363 */
6464 public function from (string $ baseCurrency ): CurrencyDriverContract
@@ -83,7 +83,7 @@ public function currencies($symbols = []): CurrencyDriverContract
8383 * @param array $symbols
8484 *
8585 * @return CurrencyDriverContract
86- *@see CurrencyDriverContract::currencies()
86+ * @see CurrencyDriverContract::currencies()
8787 *
8888 */
8989 public function to ($ symbols = []): CurrencyDriverContract
@@ -111,7 +111,7 @@ public function amount($amount): CurrencyDriverContract
111111 */
112112 public function date ($ date ): CurrencyDriverContract
113113 {
114- if ($ date === null ) {
114+ if ($ date === null ) {
115115 return $ this ;
116116 }
117117
@@ -210,14 +210,14 @@ function apiRequest(string $endpoint, array $params = [], string $method = 'GET'
210210
211211 try {
212212 $ response = $ this ->httpClient ->request ($ method , $ url , ['query ' => array_merge ($ this ->httpParams , $ params )])->getBody ();
213- } catch (GuzzleException $ e ) {
213+ } catch (GuzzleException $ e ) {
214214 throw new ApiException ($ e ->getMessage (), $ e ->getCode (), $ e );
215215 }
216216
217217 $ data = json_decode ($ response ->getContents (), true );
218218
219219 // Check for JSON errors
220- if (json_last_error () !== JSON_ERROR_NONE || ! is_array ($ data )) {
220+ if (json_last_error () !== JSON_ERROR_NONE || !is_array ($ data )) {
221221 throw new ApiException (json_last_error_msg (), json_last_error ());
222222 }
223223
0 commit comments