Skip to content

Commit bba8d12

Browse files
committed
fix: product entity
1 parent d9b9af2 commit bba8d12

5 files changed

+8
-8
lines changed

src/Entity/PrestashopProduct.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ final class PrestashopProduct
2929
public array $availableLater = [];
3030
public PrestashopAssociations $associations;
3131
public ?int $id = null;
32-
public ?string $idManufacturer = null;
33-
public ?string $idSupplier = null;
32+
public null|int|string $idManufacturer = null;
33+
public null|int|string $idSupplier = null;
3434
public ?int $idCategoryDefault = null;
3535
public ?string $new = null;
3636
public ?int $cacheDefaultAttribute = null;

src/Normalizer/PrestashopDeliveryPointNormalizer.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function __construct(ObjectNormalizer $normalizer)
1818
/**
1919
* @param array<string, string> $context
2020
*/
21-
public function denormalize($data, string $type, string $format = null, array $context = [])
21+
public function denormalize($data, string $type, ?string $format = null, array $context = [])
2222
{
2323
if (!\is_string($data)) {
2424
return $data;
@@ -30,7 +30,7 @@ public function denormalize($data, string $type, string $format = null, array $c
3030
/**
3131
* @param array<string, string> $context
3232
*/
33-
public function supportsDenormalization($data, string $type, string $format = null, array $context = []): bool
33+
public function supportsDenormalization($data, string $type, ?string $format = null, array $context = []): bool
3434
{
3535
return PrestashopTntOfficielDeliveryPoint::class === $type;
3636
}

src/Normalizer/PrestashopItemNormalizer.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class PrestashopItemNormalizer implements DenormalizerInterface
1212
*
1313
* @return PrestashopItem|array<PrestashopItem>
1414
*/
15-
public function denormalize($data, string $type, string $format = null, array $context = [])
15+
public function denormalize($data, string $type, ?string $format = null, array $context = [])
1616
{
1717
if (!\is_string($data)) {
1818
return [];
@@ -24,7 +24,7 @@ public function denormalize($data, string $type, string $format = null, array $c
2424
return PrestashopItem::class === $type ? $prestashopItem : [$prestashopItem];
2525
}
2626

27-
public function supportsDenormalization($data, string $type, string $format = null): bool
27+
public function supportsDenormalization($data, string $type, ?string $format = null): bool
2828
{
2929
return !\is_array($data)
3030
&& (PrestashopItem::class === $type || PrestashopItem::class . '[]' === $type);

src/Request/PrestashopGetRequest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function setDisplay(string ...$display): self
4343
return $this;
4444
}
4545

46-
public function setLimit(?int $limit, int $offset = null): self
46+
public function setLimit(?int $limit, ?int $offset = null): self
4747
{
4848
if ($offset) {
4949
$this->limit = $offset . ',' . $limit;

tests/Api/AbstractPrestashopApiTestCase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ protected function setUp(): void
1616
{
1717
parent::setUp();
1818

19-
static::$fixturesDir = \dirname(__DIR__) . '/fixtures/';
19+
static::$fixturesDir = __DIR__ . '/../fixtures/';
2020
}
2121

2222
protected function fixturePath(string $filename): string

0 commit comments

Comments
 (0)