Skip to content

Commit

Permalink
fix type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariful committed Sep 28, 2022
1 parent b23741b commit c6ad313
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions src/Job/SendSmsJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,18 @@ public function __construct(array $jobDetails)
/**
* Execute the job.
*
* @return ResponseInterface
* @throws GuzzleException
* @return ResponseInterface|null
* @throws GuzzleException|JsonException
*/
public function handle()
{


if ($this->jobDetails['method'] == 'post') {
return $this->postMethodHandler();

} else {
return $this->getMethodHandler();
}

return $this->getMethodHandler();
}

/**
Expand Down Expand Up @@ -106,7 +105,7 @@ private function getMethodHandler()
$log = [
'provider' => $this->jobDetails['requestUrl'],
'request_json' => json_encode($this->jobDetails['query'], JSON_THROW_ON_ERROR),
'response_json' => json_encode($e->getMessage()),
'response_json' => json_encode($e->getMessage(), JSON_THROW_ON_ERROR),
];
}

Expand Down
4 changes: 2 additions & 2 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct($requestUrl, array $query, bool $queue = false, arra
* @throws RenderException
*/

public function get(bool $verify = false, $timeout = 10.0)
public function get(bool $verify = false, float $timeout = 10.0)
{
$client = new Client([
'base_uri' => $this->requestUrl,
Expand Down Expand Up @@ -206,7 +206,7 @@ public function setFormParams(array $form_params): Request
* @param mixed $timeout
* @return array
*/
private function optionsGetRequest(bool $verify, mixed $timeout): array
private function optionsGetRequest(bool $verify, float $timeout): array
{
$options = [
'requestUrl' => $this->requestUrl,
Expand Down

0 comments on commit c6ad313

Please sign in to comment.