Introduced new Data Transfer Objects (DTOs), exceptions, and jobs to enhance the translation service functionality. Updated namespaces for consistency and added rate limiting to the translation provider. Expanded the README with detailed usage instructions.
20 lines
333 B
PHP
20 lines
333 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace KorElf\TranslateLaravel\DTO;
|
|
|
|
final class Translated
|
|
{
|
|
private array $data = [];
|
|
|
|
public function add(string $key, int $parts): self
|
|
{
|
|
$this->data[$key] = $parts;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function toArray(): array
|
|
{
|
|
return $this->data;
|
|
}
|
|
} |