Skip to content

Commit

Permalink
refactor: change imports annotation for php docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gasspper committed Jul 23, 2024
1 parent bf1da94 commit ed9ceb0
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 48 deletions.
3 changes: 1 addition & 2 deletions src/Contracts/HttpClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Transbank\Contracts;

use Psr\Http\Message\ResponseInterface;
use GuzzleHttp\Exception\GuzzleException;

interface HttpClientInterface
{
Expand All @@ -13,7 +12,7 @@ interface HttpClientInterface
* @param array|null $payload
* @param array|null $options
*
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return ResponseInterface
*/
Expand Down
3 changes: 1 addition & 2 deletions src/Contracts/RequestService.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Transbank\Contracts;

use Transbank\Webpay\Options;
use Transbank\Webpay\Exceptions\WebpayRequestException;
use Psr\Http\Message\ResponseInterface;
use Transbank\Webpay\Exceptions\TransbankApiRequest;

Expand All @@ -15,7 +14,7 @@ interface RequestService
* @param array $payload
* @param Options $options
*
* @throws WebpayRequestException
* @throws \Transbank\Webpay\Exceptions\WebpayRequestException
*
* @return array Response from the API as json.
*/
Expand Down
5 changes: 2 additions & 3 deletions src/PatpassComercio/Inscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Transbank\Utils\RequestServiceTrait;
use Transbank\Contracts\RequestService;
use Transbank\PatpassComercio\Options;
use GuzzleHttp\Exception\GuzzleException;

class Inscription
{
Expand Down Expand Up @@ -63,7 +62,7 @@ public function __construct(
* @param string $city
*
* @throws InscriptionStartException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return InscriptionStartResponse
*/
Expand Down Expand Up @@ -123,7 +122,7 @@ public function start(
* @param string $token
*
* @throws InscriptionStatusException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return InscriptionStatusResponse
*/
Expand Down
5 changes: 2 additions & 3 deletions src/Utils/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Composer\InstalledVersions;
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Exception\GuzzleException;
use Transbank\Contracts\HttpClientInterface;
use Psr\Http\Message\ResponseInterface;

Expand All @@ -18,7 +17,7 @@ class HttpClient implements HttpClientInterface
* @param array|null $payload
* @param array|null $options
*
*@throws GuzzleException
*@throws \GuzzleHttp\Exception\GuzzleException
*
* @return ResponseInterface
*/
Expand Down Expand Up @@ -65,7 +64,7 @@ public function request(
* @param string|null $payload
* @param int $timeout
*
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return ResponseInterface
*/
Expand Down
3 changes: 1 addition & 2 deletions src/Utils/HttpClientRequestService.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Transbank\Webpay\Exceptions\TransbankApiRequest;
use Transbank\Webpay\Exceptions\WebpayRequestException;
use Transbank\Webpay\Options;
use GuzzleHttp\Exception\GuzzleException;
use Psr\Http\Message\ResponseInterface;

class HttpClientRequestService implements RequestService
Expand Down Expand Up @@ -56,7 +55,7 @@ public function setHttpClient(HttpClientInterface $httpClient): void
* @param array $payload
* @param Options $options
*
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
* @throws WebpayRequestException
*
* @return array
Expand Down
3 changes: 1 addition & 2 deletions src/Utils/RequestServiceTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Transbank\Utils;

use Transbank\Contracts\RequestService;
use Transbank\Webpay\Exceptions\WebpayRequestException;

/**
* Trait RequestServiceTrait .
Expand All @@ -21,7 +20,7 @@ trait RequestServiceTrait
* @param string $endpoint
* @param array $payload
*
* @throws WebpayRequestException
* @throws \Transbank\Webpay\Exceptions\WebpayRequestException
*
* @return array
*/
Expand Down
7 changes: 3 additions & 4 deletions src/Webpay/Oneclick/MallInscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Transbank\Webpay\Oneclick\Responses\InscriptionDeleteResponse;
use Transbank\Webpay\Oneclick\Responses\InscriptionFinishResponse;
use Transbank\Webpay\Oneclick\Responses\InscriptionStartResponse;
use GuzzleHttp\Exception\GuzzleException;

class MallInscription
{
Expand All @@ -28,7 +27,7 @@ class MallInscription
* @return InscriptionStartResponse
*
* @throws InscriptionStartException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function start(string $username, string $email, string $responseUrl): InscriptionStartResponse
{
Expand Down Expand Up @@ -63,7 +62,7 @@ public function start(string $username, string $email, string $responseUrl): Ins
* @return InscriptionFinishResponse
*
* @throws InscriptionFinishException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function finish(string $token): InscriptionFinishResponse
{
Expand Down Expand Up @@ -93,7 +92,7 @@ public function finish(string $token): InscriptionFinishResponse
* @return InscriptionDeleteResponse
*
* @throws InscriptionDeleteException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete(string $tbkUser, string $username): InscriptionDeleteResponse
{
Expand Down
9 changes: 4 additions & 5 deletions src/Webpay/Oneclick/MallTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Transbank\Webpay\Oneclick\Responses\MallTransactionCaptureResponse;
use Transbank\Webpay\Oneclick\Responses\MallTransactionRefundResponse;
use Transbank\Webpay\Oneclick\Responses\MallTransactionStatusResponse;
use GuzzleHttp\Exception\GuzzleException;

class MallTransaction
{
Expand All @@ -31,7 +30,7 @@ class MallTransaction
* @return MallTransactionAuthorizeResponse
*
* @throws MallTransactionAuthorizeException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function authorize(
string $userName,
Expand Down Expand Up @@ -74,7 +73,7 @@ public function authorize(
* @return MallTransactionCaptureResponse
*
* @throws MallTransactionCaptureException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function capture(
string $childCommerceCode,
Expand Down Expand Up @@ -114,7 +113,7 @@ public function capture(
* @return MallTransactionStatusResponse
*
* @throws MallTransactionStatusException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function status(string $buyOrder): MallTransactionStatusResponse
{
Expand Down Expand Up @@ -146,7 +145,7 @@ public function status(string $buyOrder): MallTransactionStatusResponse
* @return MallTransactionRefundResponse
*
* @throws MallRefundTransactionException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function refund(
string $buyOrder,
Expand Down
3 changes: 1 addition & 2 deletions src/Webpay/TransaccionCompleta/MallTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
use Transbank\Webpay\TransaccionCompleta\Responses\MallTransactionStatusResponse;
use Transbank\Webpay\TransaccionCompleta\Responses\MallTransactionCaptureResponse;
use Transbank\Utils\InteractsWithWebpayApi;
use GuzzleHttp\Exception\GuzzleException;
use Transbank\Webpay\Exceptions\WebpayRequestException;

class MallTransaction
Expand Down Expand Up @@ -224,7 +223,7 @@ public function status(string $token)
* @param int|float $captureAmount
*
* @throws MallTransactionCaptureException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return MallTransactionCaptureResponse
*/
Expand Down
13 changes: 6 additions & 7 deletions src/Webpay/TransaccionCompleta/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Transbank\Webpay\TransaccionCompleta\Responses\TransactionCaptureResponse;
use Transbank\Utils\InteractsWithWebpayApi;
use Transbank\Webpay\Exceptions\WebpayRequestException;
use GuzzleHttp\Exception\GuzzleException;

/**
* Class Transaction.
Expand All @@ -42,7 +41,7 @@ class Transaction
* @param string|null $cvv
*
* @throws TransactionCreateException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return TransactionCreateResponse
*/
Expand Down Expand Up @@ -83,7 +82,7 @@ public function create(
* @param int $installmentsNumber
*
* @throws TransactionInstallmentsException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return TransactionInstallmentsResponse
*/
Expand Down Expand Up @@ -119,7 +118,7 @@ public function installments(
* @param bool|null $gracePeriod
*
* @throws TransactionCommitException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return TransactionCommitResponse
*/
Expand Down Expand Up @@ -157,7 +156,7 @@ public function commit(
* @param int|float $amount
*
* @throws TransactionRefundException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return TransactionRefundResponse
*/
Expand Down Expand Up @@ -188,7 +187,7 @@ public function refund(string $token, int|float $amount)
* @param string $token
*
* @throws TransactionStatusException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return TransactionStatusResponse
*/
Expand Down Expand Up @@ -218,7 +217,7 @@ public function status($token)
* @param int|float $captureAmount
*
* @throws TransactionCaptureException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return TransactionCaptureResponse
*/
Expand Down
13 changes: 5 additions & 8 deletions src/Webpay/WebpayPlus/MallTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

use Transbank\Utils\InteractsWithWebpayApi;
use Transbank\Webpay\Exceptions\WebpayRequestException;
use Transbank\Webpay\Options;
use Transbank\Webpay\WebpayPlus;
use Transbank\Webpay\WebpayPlus\Exceptions\MallTransactionCaptureException;
use Transbank\Webpay\WebpayPlus\Exceptions\MallTransactionCommitException;
use Transbank\Webpay\WebpayPlus\Exceptions\MallTransactionCreateException;
Expand All @@ -16,7 +14,6 @@
use Transbank\Webpay\WebpayPlus\Responses\MallTransactionCreateResponse;
use Transbank\Webpay\WebpayPlus\Responses\MallTransactionRefundResponse;
use Transbank\Webpay\WebpayPlus\Responses\MallTransactionStatusResponse;
use GuzzleHttp\Exception\GuzzleException;

class MallTransaction
{
Expand All @@ -36,7 +33,7 @@ class MallTransaction
* @param array $details
*
* @throws MallTransactionCreateException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return MallTransactionCreateResponse
*/
Expand Down Expand Up @@ -72,7 +69,7 @@ public function create(string $buyOrder, string $sessionId, string $returnUrl, a
* @param string $token
*
* @throws MallTransactionCommitException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return MallTransactionCommitResponse
*/
Expand Down Expand Up @@ -111,7 +108,7 @@ public function commit(string $token)
* @param int|float $amount
*
* @throws MallTransactionRefundException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return MallTransactionRefundResponse
*/
Expand Down Expand Up @@ -146,7 +143,7 @@ public function refund(string $token, string $buyOrder, string $childCommerceCod
* @param string $token
*
* @throws MallTransactionStatusException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return MallTransactionStatusResponse
*/
Expand Down Expand Up @@ -179,7 +176,7 @@ public function status(string $token)
* @param int|float $captureAmount
*
* @throws MallTransactionCaptureException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return MallTransactionCaptureResponse
*/
Expand Down
11 changes: 5 additions & 6 deletions src/Webpay/WebpayPlus/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Transbank\Webpay\WebpayPlus;

use Transbank\Utils\InteractsWithWebpayApi;
use GuzzleHttp\Exception\GuzzleException;
use Transbank\Webpay\Exceptions\WebpayRequestException;
use Transbank\Webpay\WebpayPlus\Exceptions\TransactionCaptureException;
use Transbank\Webpay\WebpayPlus\Exceptions\TransactionCommitException;
Expand Down Expand Up @@ -43,7 +42,7 @@ class Transaction
* @param string $returnUrl
*
* @throws TransactionCreateException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return TransactionCreateResponse
*/
Expand Down Expand Up @@ -79,7 +78,7 @@ public function create(
* @param string $token
*
* @throws TransactionCommitException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return TransactionCommitResponse
*/
Expand Down Expand Up @@ -116,7 +115,7 @@ public function commit(string $token): TransactionCommitResponse
* @param int|float $amount
*
* @throws TransactionRefundException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return TransactionRefundResponse
*/
Expand Down Expand Up @@ -145,7 +144,7 @@ public function refund(string $token, int|float $amount): TransactionRefundRespo
* @param string $token
*
* @throws TransactionStatusException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return TransactionStatusResponse
*/
Expand Down Expand Up @@ -177,7 +176,7 @@ public function status(string $token): TransactionStatusResponse
* @param int|float $captureAmount
*
* @throws TransactionCaptureException
* @throws GuzzleException
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return TransactionCaptureResponse
*/
Expand Down
Loading

0 comments on commit ed9ceb0

Please sign in to comment.