Skip to content

Commit

Permalink
Merge pull request #41 from picqer/fix-variable-php82
Browse files Browse the repository at this point in the history
Change ${var} to {$var} for php 8.2
  • Loading branch information
casperbakker authored Jan 2, 2024
2 parents ef9a4e3 + b913b10 commit 452a528
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 39 deletions.
76 changes: 38 additions & 38 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function getCommissions(array $commissionQueries): array
*/
public function getCommission(string $ean, float $unitPrice, ?Enum\GetCommissionCondition $condition = null): ?Model\Commission
{
$url = "retailer/commission/${ean}";
$url = "retailer/commission/{$ean}";
$options = [
'query' => [
'unit-price' => $unitPrice,
Expand Down Expand Up @@ -78,7 +78,7 @@ public function getCommission(string $ean, float $unitPrice, ?Enum\GetCommission
*/
public function getCatalogProduct(string $ean, ?string $AcceptLanguage = null): ?Model\CatalogProduct
{
$url = "retailer/content/catalog-products/${ean}";
$url = "retailer/content/catalog-products/{$ean}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand Down Expand Up @@ -152,7 +152,7 @@ public function postProductContent(Model\CreateProductContentSingleRequest $crea
*/
public function getUploadReport(string $uploadId): ?Model\UploadReportResponse
{
$url = "retailer/content/upload-report/${uploadId}";
$url = "retailer/content/upload-report/{$uploadId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand Down Expand Up @@ -375,7 +375,7 @@ public function getInvoices(?string $periodStartDate = null, ?string $periodEndD
*/
public function getInvoice(string $invoiceId): string
{
$url = "retailer/invoices/${invoiceId}";
$url = "retailer/invoices/{$invoiceId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand All @@ -401,7 +401,7 @@ public function getInvoice(string $invoiceId): string
*/
public function getInvoiceSpecification(string $invoiceId, ?int $page = null): ?string
{
$url = "retailer/invoices/${invoiceId}/specification";
$url = "retailer/invoices/{$invoiceId}/specification";
$options = [
'query' => [
'page' => $page,
Expand Down Expand Up @@ -479,7 +479,7 @@ public function postOfferExport(string $format): Model\ProcessStatus
*/
public function getOfferExport(string $reportId): ?string
{
$url = "retailer/offers/export/${reportId}";
$url = "retailer/offers/export/{$reportId}";
$options = [
'produces' => 'application/vnd.retailer.v10+csv',
];
Expand Down Expand Up @@ -528,7 +528,7 @@ public function postUnpublishedOfferReport(string $format): Model\ProcessStatus
*/
public function getUnpublishedOfferReport(string $reportId): ?string
{
$url = "retailer/offers/unpublished/${reportId}";
$url = "retailer/offers/unpublished/{$reportId}";
$options = [
'produces' => 'application/vnd.retailer.v10+csv',
];
Expand All @@ -552,7 +552,7 @@ public function getUnpublishedOfferReport(string $reportId): ?string
*/
public function getOffer(string $offerId): ?Model\RetailerOffer
{
$url = "retailer/offers/${offerId}";
$url = "retailer/offers/{$offerId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand All @@ -577,7 +577,7 @@ public function getOffer(string $offerId): ?Model\RetailerOffer
*/
public function putOffer(string $offerId, Model\UpdateOfferRequest $updateOfferRequest): Model\ProcessStatus
{
$url = "retailer/offers/${offerId}";
$url = "retailer/offers/{$offerId}";
$options = [
'body' => $updateOfferRequest,
'produces' => 'application/vnd.retailer.v10+json',
Expand All @@ -602,7 +602,7 @@ public function putOffer(string $offerId, Model\UpdateOfferRequest $updateOfferR
*/
public function deleteOffer(string $offerId): Model\ProcessStatus
{
$url = "retailer/offers/${offerId}";
$url = "retailer/offers/{$offerId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand All @@ -626,7 +626,7 @@ public function deleteOffer(string $offerId): Model\ProcessStatus
*/
public function updateOfferPrice(string $offerId, Model\Pricing $pricing): Model\ProcessStatus
{
$url = "retailer/offers/${offerId}/price";
$url = "retailer/offers/{$offerId}/price";
$options = [
'body' => Model\UpdateOfferPriceRequest::constructFromArray(['pricing' => $pricing]),
'produces' => 'application/vnd.retailer.v10+json',
Expand All @@ -652,7 +652,7 @@ public function updateOfferPrice(string $offerId, Model\Pricing $pricing): Model
*/
public function updateOfferStock(string $offerId, Model\UpdateOfferStockRequest $updateOfferStockRequest): Model\ProcessStatus
{
$url = "retailer/offers/${offerId}/stock";
$url = "retailer/offers/{$offerId}/stock";
$options = [
'body' => $updateOfferStockRequest,
'produces' => 'application/vnd.retailer.v10+json',
Expand Down Expand Up @@ -742,7 +742,7 @@ public function cancelOrderItem(array $orderItems): Model\ProcessStatus
*/
public function getOrder(string $orderId): ?Model\Order
{
$url = "retailer/orders/${orderId}";
$url = "retailer/orders/{$orderId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand Down Expand Up @@ -827,7 +827,7 @@ public function getProductListFilters(?Enum\GetProductListFiltersCountryCode $co
*/
public function getProductAssets(string $ean, ?Enum\GetProductAssetsUsage $usage = null): array
{
$url = "retailer/products/${ean}/assets";
$url = "retailer/products/{$ean}/assets";
$options = [
'query' => [
'usage' => $usage,
Expand Down Expand Up @@ -860,7 +860,7 @@ public function getProductAssets(string $ean, ?Enum\GetProductAssetsUsage $usage
*/
public function getCompetingOffers(string $ean, ?int $page = 1, ?Enum\GetCompetingOffersCountryCode $countryCode = null, ?bool $bestOfferOnly = false, ?Enum\GetCompetingOffersCondition $condition = null): array
{
$url = "retailer/products/${ean}/offers";
$url = "retailer/products/{$ean}/offers";
$options = [
'query' => [
'page' => $page,
Expand Down Expand Up @@ -893,7 +893,7 @@ public function getCompetingOffers(string $ean, ?int $page = 1, ?Enum\GetCompeti
*/
public function getProductPlacement(string $ean, ?Enum\GetProductPlacementCountryCode $countryCode = null, ?string $AcceptLanguage = null): ?Model\ProductPlacementResponse
{
$url = "retailer/products/${ean}/placement";
$url = "retailer/products/{$ean}/placement";
$options = [
'query' => [
'country-code' => $countryCode,
Expand All @@ -920,7 +920,7 @@ public function getProductPlacement(string $ean, ?Enum\GetProductPlacementCountr
*/
public function getPriceStarBoundaries(string $ean): ?Model\PriceStarBoundaries
{
$url = "retailer/products/${ean}/price-star-boundaries";
$url = "retailer/products/{$ean}/price-star-boundaries";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand All @@ -944,7 +944,7 @@ public function getPriceStarBoundaries(string $ean): ?Model\PriceStarBoundaries
*/
public function getProductIds(string $ean): ?Model\ProductIdsResponse
{
$url = "retailer/products/${ean}/product-ids";
$url = "retailer/products/{$ean}/product-ids";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand All @@ -968,7 +968,7 @@ public function getProductIds(string $ean): ?Model\ProductIdsResponse
*/
public function getProductRatings(string $ean): array
{
$url = "retailer/products/${ean}/ratings";
$url = "retailer/products/{$ean}/ratings";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand Down Expand Up @@ -1021,7 +1021,7 @@ public function getPromotions(Enum\GetPromotionsPromotionType $promotionType, ?i
*/
public function getPromotion(string $promotionId): ?Model\Promotion
{
$url = "retailer/promotions/${promotionId}";
$url = "retailer/promotions/{$promotionId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand All @@ -1046,7 +1046,7 @@ public function getPromotion(string $promotionId): ?Model\Promotion
*/
public function getProducts(string $promotionId, ?int $page = 1): array
{
$url = "retailer/promotions/${promotionId}/products";
$url = "retailer/promotions/{$promotionId}/products";
$options = [
'query' => [
'page' => $page,
Expand Down Expand Up @@ -1205,7 +1205,7 @@ public function postRequestProductDestinations(array $eans): Model\ProcessStatus
*/
public function getProductDestinations(string $productDestinationsId): array
{
$url = "retailer/replenishments/product-destinations/${productDestinationsId}";
$url = "retailer/replenishments/product-destinations/{$productDestinationsId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand Down Expand Up @@ -1256,7 +1256,7 @@ public function postProductLabels(Model\ProductLabelsRequest $productLabelsReque
*/
public function getReplenishment(string $replenishmentId): ?Model\ReplenishmentResponse
{
$url = "retailer/replenishments/${replenishmentId}";
$url = "retailer/replenishments/{$replenishmentId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand All @@ -1281,7 +1281,7 @@ public function getReplenishment(string $replenishmentId): ?Model\ReplenishmentR
*/
public function putReplenishment(string $replenishmentId, Model\UpdateReplenishmentRequest $updateReplenishmentRequest): Model\ProcessStatus
{
$url = "retailer/replenishments/${replenishmentId}";
$url = "retailer/replenishments/{$replenishmentId}";
$options = [
'body' => $updateReplenishmentRequest,
'produces' => 'application/vnd.retailer.v10+json',
Expand All @@ -1307,7 +1307,7 @@ public function putReplenishment(string $replenishmentId, Model\UpdateReplenishm
*/
public function getLoadCarrierLabels(string $replenishmentId, ?Enum\GetLoadCarrierLabelsLabelType $labelType = null): ?string
{
$url = "retailer/replenishments/${replenishmentId}/load-carrier-labels";
$url = "retailer/replenishments/{$replenishmentId}/load-carrier-labels";
$options = [
'query' => [
'label-type' => $labelType,
Expand All @@ -1334,7 +1334,7 @@ public function getLoadCarrierLabels(string $replenishmentId, ?Enum\GetLoadCarri
*/
public function getPickList(string $replenishmentId): ?string
{
$url = "retailer/replenishments/${replenishmentId}/pick-list";
$url = "retailer/replenishments/{$replenishmentId}/pick-list";
$options = [
'produces' => 'application/vnd.retailer.v10+pdf',
];
Expand All @@ -1358,7 +1358,7 @@ public function getPickList(string $replenishmentId): ?string
*/
public function getRetailerInformation(string $retailerId): ?Model\RetailerInformationResponse
{
$url = "retailer/retailers/${retailerId}";
$url = "retailer/retailers/{$retailerId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand Down Expand Up @@ -1440,7 +1440,7 @@ public function createReturn(Model\CreateReturnRequest $createReturnRequest): Mo
*/
public function getReturn(string $returnId): ?Model\ReturnObject
{
$url = "retailer/returns/${returnId}";
$url = "retailer/returns/{$returnId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand All @@ -1466,7 +1466,7 @@ public function getReturn(string $returnId): ?Model\ReturnObject
*/
public function handleReturn(int $rmaId, Model\ReturnRequest $returnRequest): Model\ProcessStatus
{
$url = "retailer/returns/${rmaId}";
$url = "retailer/returns/{$rmaId}";
$options = [
'body' => $returnRequest,
'produces' => 'application/vnd.retailer.v10+json',
Expand Down Expand Up @@ -1587,7 +1587,7 @@ public function getInvoiceRequests(?string $shipmentId = null, ?int $page = 1, ?
*/
public function uploadInvoice(string $shipmentId, string $invoice): ?Model\ProcessStatus
{
$url = "retailer/shipments/invoices/${shipmentId}";
$url = "retailer/shipments/invoices/{$shipmentId}";
$options = [
'multipart' => [
[
Expand Down Expand Up @@ -1618,7 +1618,7 @@ public function uploadInvoice(string $shipmentId, string $invoice): ?Model\Proce
*/
public function getShipment(string $shipmentId): ?Model\Shipment
{
$url = "retailer/shipments/${shipmentId}";
$url = "retailer/shipments/{$shipmentId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand Down Expand Up @@ -1697,7 +1697,7 @@ public function getDeliveryOptions(array $orderItems): array
*/
public function getShippingLabel(string $shippingLabelId): ?string
{
$url = "retailer/shipping-labels/${shippingLabelId}";
$url = "retailer/shipping-labels/{$shippingLabelId}";
$options = [
'produces' => 'application/vnd.retailer.v10+pdf',
];
Expand Down Expand Up @@ -1794,7 +1794,7 @@ public function getSubscriptionKeys(): array
*/
public function postTestPushNotification(string $subscriptionId): Model\ProcessStatus
{
$url = "retailer/subscriptions/test/${subscriptionId}";
$url = "retailer/subscriptions/test/{$subscriptionId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand All @@ -1819,7 +1819,7 @@ public function postTestPushNotification(string $subscriptionId): Model\ProcessS
*/
public function getPushNotificationSubscription(string $subscriptionId): ?Model\SubscriptionResponse
{
$url = "retailer/subscriptions/${subscriptionId}";
$url = "retailer/subscriptions/{$subscriptionId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand All @@ -1846,7 +1846,7 @@ public function getPushNotificationSubscription(string $subscriptionId): ?Model\
*/
public function putPushNotificationSubscription(string $subscriptionId, Model\SubscriptionRequest $subscriptionRequest): Model\ProcessStatus
{
$url = "retailer/subscriptions/${subscriptionId}";
$url = "retailer/subscriptions/{$subscriptionId}";
$options = [
'body' => $subscriptionRequest,
'produces' => 'application/vnd.retailer.v10+json',
Expand All @@ -1872,7 +1872,7 @@ public function putPushNotificationSubscription(string $subscriptionId, Model\Su
*/
public function deletePushNotificationSubscription(string $subscriptionId): Model\ProcessStatus
{
$url = "retailer/subscriptions/${subscriptionId}";
$url = "retailer/subscriptions/{$subscriptionId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand All @@ -1897,7 +1897,7 @@ public function deletePushNotificationSubscription(string $subscriptionId): Mode
*/
public function addTransportInformationByTransportId(string $transportId, Model\ChangeTransportRequest $changeTransportRequest): Model\ProcessStatus
{
$url = "retailer/transports/${transportId}";
$url = "retailer/transports/{$transportId}";
$options = [
'body' => $changeTransportRequest,
'produces' => 'application/vnd.retailer.v10+json',
Expand Down Expand Up @@ -1993,7 +1993,7 @@ public function getProcessStatusBulk(array $processStatusQueries): array
*/
public function getProcessStatus(string $processStatusId): ?Model\ProcessStatus
{
$url = "shared/process-status/${processStatusId}";
$url = "shared/process-status/{$processStatusId}";
$options = [
'produces' => 'application/vnd.retailer.v10+json',
];
Expand Down
2 changes: 1 addition & 1 deletion src/OpenApi/ClientGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ protected function getUrl(string $path, array $arguments): string

$url = str_replace(
'{' . $argument['paramName'] . '}',
'${' . $argument['name'] . '}',
'{$' . $argument['name'] . '}',
$url
);
}
Expand Down

0 comments on commit 452a528

Please sign in to comment.