Skip to content

Commit

Permalink
fix: product entity
Browse files Browse the repository at this point in the history
  • Loading branch information
rem42 committed May 16, 2024
1 parent d9b9af2 commit bba8d12
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Entity/PrestashopProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ final class PrestashopProduct
public array $availableLater = [];
public PrestashopAssociations $associations;
public ?int $id = null;
public ?string $idManufacturer = null;
public ?string $idSupplier = null;
public null|int|string $idManufacturer = null;
public null|int|string $idSupplier = null;
public ?int $idCategoryDefault = null;
public ?string $new = null;
public ?int $cacheDefaultAttribute = null;
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/PrestashopDeliveryPointNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(ObjectNormalizer $normalizer)
/**
* @param array<string, string> $context
*/
public function denormalize($data, string $type, string $format = null, array $context = [])
public function denormalize($data, string $type, ?string $format = null, array $context = [])
{
if (!\is_string($data)) {
return $data;
Expand All @@ -30,7 +30,7 @@ public function denormalize($data, string $type, string $format = null, array $c
/**
* @param array<string, string> $context
*/
public function supportsDenormalization($data, string $type, string $format = null, array $context = []): bool
public function supportsDenormalization($data, string $type, ?string $format = null, array $context = []): bool
{
return PrestashopTntOfficielDeliveryPoint::class === $type;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/PrestashopItemNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PrestashopItemNormalizer implements DenormalizerInterface
*
* @return PrestashopItem|array<PrestashopItem>
*/
public function denormalize($data, string $type, string $format = null, array $context = [])
public function denormalize($data, string $type, ?string $format = null, array $context = [])
{
if (!\is_string($data)) {
return [];
Expand All @@ -24,7 +24,7 @@ public function denormalize($data, string $type, string $format = null, array $c
return PrestashopItem::class === $type ? $prestashopItem : [$prestashopItem];
}

public function supportsDenormalization($data, string $type, string $format = null): bool
public function supportsDenormalization($data, string $type, ?string $format = null): bool
{
return !\is_array($data)
&& (PrestashopItem::class === $type || PrestashopItem::class . '[]' === $type);
Expand Down
2 changes: 1 addition & 1 deletion src/Request/PrestashopGetRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function setDisplay(string ...$display): self
return $this;
}

public function setLimit(?int $limit, int $offset = null): self
public function setLimit(?int $limit, ?int $offset = null): self
{
if ($offset) {
$this->limit = $offset . ',' . $limit;
Expand Down
2 changes: 1 addition & 1 deletion tests/Api/AbstractPrestashopApiTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected function setUp(): void
{
parent::setUp();

static::$fixturesDir = \dirname(__DIR__) . '/fixtures/';
static::$fixturesDir = __DIR__ . '/../fixtures/';
}

protected function fixturePath(string $filename): string
Expand Down

0 comments on commit bba8d12

Please sign in to comment.