Skip to content

Commit

Permalink
adjust code review
Browse files Browse the repository at this point in the history
  • Loading branch information
eltinMeli committed Aug 22, 2023
1 parent a5d93bd commit a0150f1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/MercadoPago/Client/Payment/PaymentClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ public function capture(int $id, ?float $amount, ?MPRequestOptions $request_opti
/**
* Method responsible for search payments.
* @param \MercadoPago\Net\MPSearchRequest $request search request.
* @param mixed $requestOptions request options to be sent.
* @param mixed $request_options request options to be sent.
* @return \MercadoPago\Resources\PaymentSearch search results.
*/
public function search(MPSearchRequest $request, ?MPRequestOptions $requestOptions = null): PaymentSearch
public function search(MPSearchRequest $request, ?MPRequestOptions $request_options = null): PaymentSearch
{
try {
$queryParams = isset($request) ? $request->getParameters() : null;
$response = parent::send(self::$URL_SEARCH, HttpMethod::GET, null, $queryParams, $requestOptions);
$query_params = isset($request) ? $request->getParameters() : null;
$response = parent::send(self::$URL_SEARCH, HttpMethod::GET, null, $query_params, $request_options);
$result = Serializer::deserializeFromJson(PaymentSearch::class, $response->getContent());
$result->setResponse($response);
return $result;
Expand Down
8 changes: 4 additions & 4 deletions src/MercadoPago/Client/Preference/PreferenceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ public function update(string $id, array $request, ?MPRequestOptions $request_op
/**
* Method responsible for search preferences.
* @param \MercadoPago\Net\MPSearchRequest $request search request.
* @param mixed $requestOptions request options to be sent.
* @param mixed $request_options request options to be sent.
* @return \MercadoPago\Resources\PreferenceSearch search results.
*/
public function search(MPSearchRequest $request, ?MPRequestOptions $requestOptions = null): PreferenceSearch
public function search(MPSearchRequest $request, ?MPRequestOptions $request_options = null): PreferenceSearch
{
try {
$queryParams = isset($request) ? $request->getParameters() : null;
$response = parent::send(self::$URL_SEARCH, HttpMethod::GET, null, $queryParams, $requestOptions);
$query_params = isset($request) ? $request->getParameters() : null;
$response = parent::send(self::$URL_SEARCH, HttpMethod::GET, null, $query_params, $request_options);
$result = Serializer::deserializeFromJson(PreferenceSearch::class, $response->getContent());
$result->setResponse($response);
return $result;
Expand Down
2 changes: 1 addition & 1 deletion src/MercadoPago/Resources/Preference/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Item
public ?int $quantity;

/** Unit price. */
public ?float $unitPrice;
public ?float $unit_price;

/** Currency ID. ISO_4217 code. */
public ?string $currency_id;
Expand Down

0 comments on commit a0150f1

Please sign in to comment.