From ccbff3aba381e679c798f7e54bf8e70acdf0711e Mon Sep 17 00:00:00 2001 From: Opheugene Date: Thu, 18 Jul 2024 17:33:02 +0200 Subject: [PATCH 1/3] Fixed ProductFilter types --- src/Model/Filter/Store/ProductFilterType.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Model/Filter/Store/ProductFilterType.php b/src/Model/Filter/Store/ProductFilterType.php index f25f0461d..278d7b10b 100644 --- a/src/Model/Filter/Store/ProductFilterType.php +++ b/src/Model/Filter/Store/ProductFilterType.php @@ -39,7 +39,7 @@ class ProductFilterType /** * @var string * - * @Form\Type("string") + * @Form\Type("int") * @Form\SerializedName("minPrice") */ public $minPrice; @@ -47,7 +47,7 @@ class ProductFilterType /** * @var string * - * @Form\Type("string") + * @Form\Type("int") * @Form\SerializedName("maxPrice") */ public $maxPrice; @@ -55,7 +55,7 @@ class ProductFilterType /** * @var string * - * @Form\Type("string") + * @Form\Type("int") * @Form\SerializedName("minPurchasePrice") */ public $minPurchasePrice; @@ -63,7 +63,7 @@ class ProductFilterType /** * @var string * - * @Form\Type("string") + * @Form\Type("int") * @Form\SerializedName("maxPurchasePrice") */ public $maxPurchasePrice; @@ -71,7 +71,7 @@ class ProductFilterType /** * @var string * - * @Form\Type("string") + * @Form\Type("int") * @Form\SerializedName("minQuantity") */ public $minQuantity; @@ -79,7 +79,7 @@ class ProductFilterType /** * @var string * - * @Form\Type("string") + * @Form\Type("int") * @Form\SerializedName("maxQuantity") */ public $maxQuantity; @@ -165,9 +165,9 @@ class ProductFilterType public $offerIds; /** - * @var string + * @var array * - * @Form\Type("string") + * @Form\Type("array") * @Form\SerializedName("properties") */ public $properties; From 7d65407c7c9f930adaf0cd0de639fdeb0fbc2af2 Mon Sep 17 00:00:00 2001 From: Opheugene Date: Thu, 18 Jul 2024 18:20:25 +0200 Subject: [PATCH 2/3] fixes for tests --- src/Model/Filter/Store/ProductFilterType.php | 28 ++++++++++---------- tests/src/ResourceGroup/StoreTest.php | 4 +-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Model/Filter/Store/ProductFilterType.php b/src/Model/Filter/Store/ProductFilterType.php index 278d7b10b..408892182 100644 --- a/src/Model/Filter/Store/ProductFilterType.php +++ b/src/Model/Filter/Store/ProductFilterType.php @@ -37,7 +37,7 @@ class ProductFilterType public $name; /** - * @var string + * @var int * * @Form\Type("int") * @Form\SerializedName("minPrice") @@ -45,7 +45,7 @@ class ProductFilterType public $minPrice; /** - * @var string + * @var int * * @Form\Type("int") * @Form\SerializedName("maxPrice") @@ -53,7 +53,7 @@ class ProductFilterType public $maxPrice; /** - * @var string + * @var int * * @Form\Type("int") * @Form\SerializedName("minPurchasePrice") @@ -61,7 +61,7 @@ class ProductFilterType public $minPurchasePrice; /** - * @var string + * @var int * * @Form\Type("int") * @Form\SerializedName("maxPurchasePrice") @@ -69,7 +69,7 @@ class ProductFilterType public $maxPurchasePrice; /** - * @var string + * @var int * * @Form\Type("int") * @Form\SerializedName("minQuantity") @@ -77,7 +77,7 @@ class ProductFilterType public $minQuantity; /** - * @var string + * @var int * * @Form\Type("int") * @Form\SerializedName("maxQuantity") @@ -85,33 +85,33 @@ class ProductFilterType public $maxQuantity; /** - * @var string + * @var int * - * @Form\Type("string") + * @Form\Type("int") * @Form\SerializedName("popular") */ public $popular; /** - * @var string + * @var int * - * @Form\Type("string") + * @Form\Type("int") * @Form\SerializedName("stock") */ public $stock; /** - * @var string + * @var int * - * @Form\Type("string") + * @Form\Type("int") * @Form\SerializedName("novelty") */ public $novelty; /** - * @var string + * @var int * - * @Form\Type("string") + * @Form\Type("int") * @Form\SerializedName("recommended") */ public $recommended; diff --git a/tests/src/ResourceGroup/StoreTest.php b/tests/src/ResourceGroup/StoreTest.php index 82b8dcab2..5c31e6a50 100644 --- a/tests/src/ResourceGroup/StoreTest.php +++ b/tests/src/ResourceGroup/StoreTest.php @@ -446,7 +446,7 @@ public function testProducts(): void $request->filter = new ProductFilterType(); $request->filter->active = NumericBoolean::TRUE; $request->filter->priceType = 'base'; - $request->filter->maxPrice = '10000'; + $request->filter->maxPrice = 10000; $request->filter->name = 'Test Product'; $mock = static::createApiMockBuilder('store/products'); @@ -548,7 +548,7 @@ public function testProductsSinceUpdated(): void $request->filter = new ProductFilterType(); $request->filter->active = NumericBoolean::TRUE; $request->filter->priceType = 'base'; - $request->filter->maxPrice = '10000'; + $request->filter->maxPrice = 10000; $request->filter->name = 'Test Product'; $request->filter->sinceId = 828272; $request->filter->sinceUpdatedAt = DateTimeTransformer::create('2020-01-01 00:00:00'); From 0ef461e504b6ae42f1e2bda1328e6240eef28419 Mon Sep 17 00:00:00 2001 From: Opheugene Date: Thu, 18 Jul 2024 18:24:03 +0200 Subject: [PATCH 3/3] fixed array of string --- src/Model/Filter/Store/ProductFilterType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Filter/Store/ProductFilterType.php b/src/Model/Filter/Store/ProductFilterType.php index 408892182..6a1fcd8f2 100644 --- a/src/Model/Filter/Store/ProductFilterType.php +++ b/src/Model/Filter/Store/ProductFilterType.php @@ -165,9 +165,9 @@ class ProductFilterType public $offerIds; /** - * @var array + * @var string[] * - * @Form\Type("array") + * @Form\Type("string[]") * @Form\SerializedName("properties") */ public $properties;