Skip to content

Commit

Permalink
catch variable
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardokum committed Nov 13, 2023
1 parent 49bdc81 commit a5c1bb8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
19 changes: 14 additions & 5 deletions src/Api/AbstractAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,9 @@ protected function setRequestInfo($requestInfo)
}

/**
* @throws HttpException|UnauthorizedException|CurlException
* @throws HttpException
* @throws UnauthorizedException
* @throws CurlException
*/
protected function post($url, array $post, $raw = false)
{
Expand All @@ -484,7 +486,9 @@ protected function post($url, array $post, $raw = false)
}

/**
* @throws HttpException|UnauthorizedException|CurlException
* @throws HttpException
* @throws UnauthorizedException
* @throws CurlException
*/
protected function put($url, array $post, $raw = false)
{
Expand Down Expand Up @@ -512,7 +516,9 @@ protected function put($url, array $post, $raw = false)
* @param $url
*
* @return stdClass
* @throws HttpException|UnauthorizedException|CurlException
* @throws HttpException
* @throws UnauthorizedException
* @throws CurlException
*/
protected function get($url)
{
Expand Down Expand Up @@ -624,7 +630,8 @@ private function parseResponse($response)
/**
* @param $retorno
*
* @throws HttpException|UnauthorizedException
* @throws HttpException
* @throws UnauthorizedException
*/
private function handleException($retorno)
{
Expand All @@ -639,7 +646,9 @@ private function handleException($retorno)

/**
* @return false|stdClass
* @throws CurlException|HttpException|UnauthorizedException
* @throws CurlException
* @throwsHttpException
* @throwsUnauthorizedException
*/
private function execute()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Banco/Inter.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function createWebhook($url, $type = 'all')
try {
$this->oAuth2()->put($this->url('webhook'), ['webhookUrl' => $url]);
return true;
} catch (Exception) {
} catch (Exception $e) {
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ public static function isBase64($str)
} else {
return false;
}
} catch (Exception) {
} catch (Exception $e) {
return false;
}
}
Expand Down

0 comments on commit a5c1bb8

Please sign in to comment.