Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yaroslawww committed Aug 9, 2020
2 parents dbfef6e + b3bc547 commit 03b98b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/LaravelZvonokApiClient.php
Expand Up @@ -32,7 +32,7 @@ public function request(string $method, string $path = '', array $options = []):
{
if (strtolower($method) == 'post') {
$key = 'multipart';
if (!isset($options[$key])) {
if (! isset($options[$key])) {
$options[$key] = [];
}
$options[$key] = array_merge($options[$key], [
Expand All @@ -41,14 +41,14 @@ public function request(string $method, string $path = '', array $options = []):
'contents' => config('laravel-zvonok-api.api_key'),
],
]);

} else {
$key = 'query';
if (!isset($options[$key])) {
if (! isset($options[$key])) {
$options[$key] = [];
}
$options[$key] = array_merge($options[$key], ['public_key' => config('laravel-zvonok-api.api_key')]);
}

return $this->client->request($method, $path, $options);
}

Expand All @@ -59,5 +59,4 @@ public function getResponse(string $method, string $path = '', array $options =

return json_decode($body);
}

}
3 changes: 0 additions & 3 deletions src/LaravelZvonokApiServiceProvider.php
Expand Up @@ -12,10 +12,7 @@ public function boot()
$this->publishes([
__DIR__.'/../config/laravel-zvonok-api.php' => config_path('laravel-zvonok-api.php'),
], 'config');


}

}

public function register()
Expand Down

0 comments on commit 03b98b4

Please sign in to comment.