Skip to content

Commit

Permalink
Make marketplace id optional in GetOffersResult
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed Apr 25, 2023
1 parent 1a92bd9 commit bed5123
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions rector-php.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use AmazonPHP\SellingPartner\Model\ListingsItems\ListingsItemPutRequest;
use AmazonPHP\SellingPartner\Model\Messaging\GetSchemaResponse;
use AmazonPHP\SellingPartner\Model\Orders\Address;
use AmazonPHP\SellingPartner\Model\ProductPricing\GetOffersResult;
use AmazonPHP\SellingPartner\Model\Uploads\UploadDestination;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BooleanType;
Expand Down Expand Up @@ -109,6 +110,11 @@
$config->ruleWithConfiguration(
AddReturnTypeDeclarationRector::class,
[
new AddReturnTypeDeclaration(
GetOffersResult::class,
'getMarketplaceId',
new UnionType([new NullType(), new StringType()]),
),
new AddReturnTypeDeclaration(
CatalogItem::class,
'getAttributes',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public function validate() : void
/**
* Gets marketplace_id.
*/
public function getMarketplaceId() : string
public function getMarketplaceId() : ?string
{
return $this->container['marketplace_id'];
}
Expand Down

0 comments on commit bed5123

Please sign in to comment.