Skip to content

Commit

Permalink
fix readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
miqayelsrapionyan committed Sep 13, 2023
1 parent 12ea968 commit c16c381
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/TranslationAppClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function getTranslations(TranslationQueryValueObject $valueObject): array
}
}

return ['data' => $processedData, 'total' => $data?->getTotal(), 'metadata' => $metadata];
return ['data' => $processedData, 'total' => $data?->getTotal() ?? 0, 'metadata' => $metadata];
}

/**
Expand Down
20 changes: 10 additions & 10 deletions src/ValueObjects/TranslationItemValueObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

namespace Uc\TranslationAppSdk\ValueObjects;

readonly class TranslationItemValueObject
class TranslationItemValueObject
{
public function __construct(
protected string $key,
protected string $value,
protected string $languageCode,
protected string $updatedAt,
protected string $resource,
protected int $resourceId,
protected string $editor,
protected int $id,
protected ?array $params,
protected readonly string $key,
protected readonly string $value,
protected readonly string $languageCode,
protected readonly string $updatedAt,
protected readonly string $resource,
protected readonly int $resourceId,
protected readonly string $editor,
protected readonly int $id,
protected readonly ?array $params,
)
{
}
Expand Down
16 changes: 8 additions & 8 deletions src/ValueObjects/TranslationQueryValueObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

namespace Uc\TranslationAppSdk\ValueObjects;

readonly class TranslationQueryValueObject
class TranslationQueryValueObject
{
public function __construct(
protected int $resourceId,
protected string $languageCode,
protected string $resource,
protected ?string $key = null,
protected array $orderBy = [],
protected int $page = 0,
protected int $first = 10,
protected readonly int $resourceId,
protected readonly string $languageCode,
protected readonly string $resource,
protected readonly ?string $key = null,
protected readonly array $orderBy = [],
protected readonly int $page = 0,
protected readonly int $first = 10,
){
}

Expand Down

0 comments on commit c16c381

Please sign in to comment.