From 752bf61bc1cb5f13646a7641bd6729a7b9fef230 Mon Sep 17 00:00:00 2001 From: Bohdan Bobko <172895427+bhdnb@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:16:31 +0300 Subject: [PATCH 1/3] fix(model): hydrate nullable fields via helpers --- .../Model/AiFileTranslation.php | 6 ++-- src/CrowdinApiClient/Model/AiPrompt.php | 14 ++++---- .../Model/AiPromptCompletion.php | 6 ++-- src/CrowdinApiClient/Model/AiProvider.php | 2 +- .../Model/AiProviderModel.php | 6 ++-- src/CrowdinApiClient/Model/AiReport.php | 6 ++-- src/CrowdinApiClient/Model/AiRequestLog.php | 30 ++++++++-------- src/CrowdinApiClient/Model/AiSettings.php | 4 +-- .../Model/ApplicationConsent.php | 7 ++-- .../Model/ApplicationInstallation.php | 14 +++----- src/CrowdinApiClient/Model/BranchClone.php | 4 +-- src/CrowdinApiClient/Model/BranchMerge.php | 4 +-- src/CrowdinApiClient/Model/DeleteJob.php | 6 ++-- .../Model/DistributionRelease.php | 10 +++--- .../Model/DownloadFileTranslation.php | 3 +- src/CrowdinApiClient/Model/File.php | 2 +- src/CrowdinApiClient/Model/FileRevision.php | 4 +-- .../HourlyUserReportSettingsTemplate.php | 2 +- src/CrowdinApiClient/Model/Language.php | 2 +- .../Model/LanguageTranslation.php | 13 +++---- src/CrowdinApiClient/Model/ProgressFile.php | 2 +- .../Model/ProgressLanguage.php | 2 +- src/CrowdinApiClient/Model/Project.php | 4 +-- .../Model/ReportSettingsTemplate.php | 2 +- src/CrowdinApiClient/Model/SourceString.php | 16 ++++----- src/CrowdinApiClient/Model/StringComment.php | 5 +-- .../Model/StringTranslation.php | 12 ++----- src/CrowdinApiClient/Model/StringUpload.php | 4 +-- src/CrowdinApiClient/Model/StyleGuide.php | 6 ++-- src/CrowdinApiClient/Model/Task.php | 36 +++++++------------ src/CrowdinApiClient/Model/TaskComment.php | 2 +- src/CrowdinApiClient/Model/TaskForUpdate.php | 16 +++------ .../Model/TranslationMemoryConcordance.php | 4 +-- .../Model/TranslationMemorySegmentRecord.php | 8 ++--- .../Model/UserReportSettingsTemplate.php | 2 +- 35 files changed, 112 insertions(+), 154 deletions(-) diff --git a/src/CrowdinApiClient/Model/AiFileTranslation.php b/src/CrowdinApiClient/Model/AiFileTranslation.php index 230ce6fa..f51f30e7 100644 --- a/src/CrowdinApiClient/Model/AiFileTranslation.php +++ b/src/CrowdinApiClient/Model/AiFileTranslation.php @@ -56,9 +56,9 @@ public function __construct(array $data = []) $this->progress = (int)$this->getDataProperty('progress'); $this->attributes = (array)$this->getDataProperty('attributes'); $this->createdAt = (string)$this->getDataProperty('createdAt'); - $this->updatedAt = $this->getDataProperty('updatedAt'); - $this->startedAt = $this->getDataProperty('startedAt'); - $this->finishedAt = $this->getDataProperty('finishedAt'); + $this->updatedAt = $this->nullableString('updatedAt'); + $this->startedAt = $this->nullableString('startedAt'); + $this->finishedAt = $this->nullableString('finishedAt'); } public function getIdentifier(): string diff --git a/src/CrowdinApiClient/Model/AiPrompt.php b/src/CrowdinApiClient/Model/AiPrompt.php index ce9fa8d6..c7f3543b 100644 --- a/src/CrowdinApiClient/Model/AiPrompt.php +++ b/src/CrowdinApiClient/Model/AiPrompt.php @@ -64,17 +64,17 @@ public function __construct(array $data = []) $this->id = (int)$this->getDataProperty('id'); $this->name = (string)$this->getDataProperty('name'); $this->action = (string)$this->getDataProperty('action'); - $this->aiProviderId = $this->getDataProperty('aiProviderId'); - $this->aiModelId = $this->getDataProperty('aiModelId'); + $this->aiProviderId = $this->nullableInt('aiProviderId'); + $this->aiModelId = $this->nullableString('aiModelId'); $this->isEnabled = (bool)$this->getDataProperty('isEnabled'); $this->enabledProjectIds = (array)$this->getDataProperty('enabledProjectIds'); $this->config = (array)$this->getDataProperty('config'); - $this->promptPreview = $this->getDataProperty('promptPreview'); + $this->promptPreview = $this->nullableString('promptPreview'); $this->isFineTuningAvailable = (bool)$this->getDataProperty('isFineTuningAvailable'); - $this->createdBy = $this->getDataProperty('createdBy'); - $this->updatedBy = $this->getDataProperty('updatedBy'); - $this->lastUsedBy = $this->getDataProperty('lastUsedBy'); - $this->lastUsedAt = $this->getDataProperty('lastUsedAt'); + $this->createdBy = $this->nullableInt('createdBy'); + $this->updatedBy = $this->nullableInt('updatedBy'); + $this->lastUsedBy = $this->nullableInt('lastUsedBy'); + $this->lastUsedAt = $this->nullableString('lastUsedAt'); $this->usageCount = (int)$this->getDataProperty('usageCount'); $this->createdAt = (string)$this->getDataProperty('createdAt'); $this->updatedAt = (string)$this->getDataProperty('updatedAt'); diff --git a/src/CrowdinApiClient/Model/AiPromptCompletion.php b/src/CrowdinApiClient/Model/AiPromptCompletion.php index b676ad42..ef574b8a 100644 --- a/src/CrowdinApiClient/Model/AiPromptCompletion.php +++ b/src/CrowdinApiClient/Model/AiPromptCompletion.php @@ -39,9 +39,9 @@ public function __construct(array $data = []) $this->progress = (int)$this->getDataProperty('progress'); $this->attributes = (array)$this->getDataProperty('attributes'); $this->createdAt = (string)$this->getDataProperty('createdAt'); - $this->updatedAt = $this->getDataProperty('updatedAt'); - $this->startedAt = $this->getDataProperty('startedAt'); - $this->finishedAt = $this->getDataProperty('finishedAt'); + $this->updatedAt = $this->nullableString('updatedAt'); + $this->startedAt = $this->nullableString('startedAt'); + $this->finishedAt = $this->nullableString('finishedAt'); } public function getIdentifier(): string diff --git a/src/CrowdinApiClient/Model/AiProvider.php b/src/CrowdinApiClient/Model/AiProvider.php index 3bb40220..cf6273a7 100644 --- a/src/CrowdinApiClient/Model/AiProvider.php +++ b/src/CrowdinApiClient/Model/AiProvider.php @@ -43,7 +43,7 @@ public function __construct(array $data = []) $this->id = (int)$this->getDataProperty('id'); $this->name = (string)$this->getDataProperty('name'); $this->type = (string)$this->getDataProperty('type'); - $this->credentials = $this->getDataProperty('credentials'); + $this->credentials = $this->nullableArray('credentials'); $this->config = (array)$this->getDataProperty('config'); $this->isEnabled = (bool)$this->getDataProperty('isEnabled'); $this->useSystemCredentials = (bool)$this->getDataProperty('useSystemCredentials'); diff --git a/src/CrowdinApiClient/Model/AiProviderModel.php b/src/CrowdinApiClient/Model/AiProviderModel.php index 40af5d67..3218aa15 100644 --- a/src/CrowdinApiClient/Model/AiProviderModel.php +++ b/src/CrowdinApiClient/Model/AiProviderModel.php @@ -47,9 +47,9 @@ public function __construct(array $data = []) parent::__construct($data); $this->id = (string)$this->getDataProperty('id'); - $this->provider = $this->getDataProperty('provider'); - $this->providerName = $this->getDataProperty('providerName'); - $this->providerId = $this->getDataProperty('providerId'); + $this->provider = $this->nullableString('provider'); + $this->providerName = $this->nullableString('providerName'); + $this->providerId = $this->nullableInt('providerId'); $this->contextWindow = $this->nullableInt('contextWindow'); $this->maxOutputTokens = $this->nullableInt('maxOutputTokens'); $this->supportsStreaming = $this->nullableBool('supportsStreaming'); diff --git a/src/CrowdinApiClient/Model/AiReport.php b/src/CrowdinApiClient/Model/AiReport.php index 15a1a125..99d2d09d 100644 --- a/src/CrowdinApiClient/Model/AiReport.php +++ b/src/CrowdinApiClient/Model/AiReport.php @@ -42,9 +42,9 @@ public function __construct(array $data = []) $this->progress = (int)$this->getDataProperty('progress'); $this->attributes = (array)$this->getDataProperty('attributes'); $this->createdAt = (string)$this->getDataProperty('createdAt'); - $this->updatedAt = $this->getDataProperty('updatedAt'); - $this->startedAt = $this->getDataProperty('startedAt'); - $this->finishedAt = $this->getDataProperty('finishedAt'); + $this->updatedAt = $this->nullableString('updatedAt'); + $this->startedAt = $this->nullableString('startedAt'); + $this->finishedAt = $this->nullableString('finishedAt'); $this->eta = $this->nullableString('eta'); } diff --git a/src/CrowdinApiClient/Model/AiRequestLog.php b/src/CrowdinApiClient/Model/AiRequestLog.php index fb69c878..14c0c327 100644 --- a/src/CrowdinApiClient/Model/AiRequestLog.php +++ b/src/CrowdinApiClient/Model/AiRequestLog.php @@ -86,26 +86,26 @@ public function __construct(array $data = []) $this->requestId = (string)$this->getDataProperty('requestId'); $this->createdAt = (string)$this->getDataProperty('createdAt'); $this->status = (string)$this->getDataProperty('status'); - $this->httpStatus = $this->getDataProperty('httpStatus'); + $this->httpStatus = $this->nullableInt('httpStatus'); $this->model = (string)$this->getDataProperty('model'); $this->sourceAction = (string)$this->getDataProperty('sourceAction'); - $this->promptAction = $this->getDataProperty('promptAction'); + $this->promptAction = $this->nullableString('promptAction'); $this->systemCredentials = (bool)$this->getDataProperty('systemCredentials'); $this->isAutoTriggered = (bool)$this->getDataProperty('isAutoTriggered'); - $this->durationMs = $this->getDataProperty('durationMs'); - $this->inputTokens = $this->getDataProperty('inputTokens'); - $this->outputTokens = $this->getDataProperty('outputTokens'); - $this->totalCost = $this->getDataProperty('totalCost'); - $this->userId = $this->getDataProperty('userId'); - $this->projectId = $this->getDataProperty('projectId'); - $this->promptId = $this->getDataProperty('promptId'); + $this->durationMs = $this->nullableInt('durationMs'); + $this->inputTokens = $this->nullableInt('inputTokens'); + $this->outputTokens = $this->nullableInt('outputTokens'); + $this->totalCost = $this->nullableFloat('totalCost'); + $this->userId = $this->nullableInt('userId'); + $this->projectId = $this->nullableInt('projectId'); + $this->promptId = $this->nullableInt('promptId'); $this->aiProviderId = (int)$this->getDataProperty('aiProviderId'); - $this->tokenName = $this->getDataProperty('tokenName'); - $this->oauthClientId = $this->getDataProperty('oauthClientId'); - $this->oauthClientName = $this->getDataProperty('oauthClientName'); - $this->ip = $this->getDataProperty('ip'); - $this->userAgent = $this->getDataProperty('userAgent'); - $this->error = $this->getDataProperty('error'); + $this->tokenName = $this->nullableString('tokenName'); + $this->oauthClientId = $this->nullableString('oauthClientId'); + $this->oauthClientName = $this->nullableString('oauthClientName'); + $this->ip = $this->nullableString('ip'); + $this->userAgent = $this->nullableString('userAgent'); + $this->error = $this->nullableString('error'); } public function getId(): int diff --git a/src/CrowdinApiClient/Model/AiSettings.php b/src/CrowdinApiClient/Model/AiSettings.php index 4cc71e91..984ce9bc 100644 --- a/src/CrowdinApiClient/Model/AiSettings.php +++ b/src/CrowdinApiClient/Model/AiSettings.php @@ -45,8 +45,8 @@ public function __construct(array $data = []) $this->preTranslationAiPromptId = (int)$this->getDataProperty('preTranslationAiPromptId'); $this->editorSuggestionAiPromptId = (int)$this->getDataProperty('editorSuggestionAiPromptId'); - $this->qaCheckActionAiPromptId = $this->getDataProperty('qaCheckActionAiPromptId'); - $this->contextReviewAiPromptId = $this->getDataProperty('contextReviewAiPromptId'); + $this->qaCheckActionAiPromptId = $this->nullableInt('qaCheckActionAiPromptId'); + $this->contextReviewAiPromptId = $this->nullableInt('contextReviewAiPromptId'); $this->alignmentActionAiPromptId = $this->nullableInt('alignmentActionAiPromptId'); $this->dailyCostLimit = $this->nullableFloat('dailyCostLimit'); $this->isLimitingActive = (bool)$this->getDataProperty('isLimitingActive'); diff --git a/src/CrowdinApiClient/Model/ApplicationConsent.php b/src/CrowdinApiClient/Model/ApplicationConsent.php index bef06581..4b0caf57 100644 --- a/src/CrowdinApiClient/Model/ApplicationConsent.php +++ b/src/CrowdinApiClient/Model/ApplicationConsent.php @@ -35,9 +35,9 @@ public function __construct(array $data = []) parent::__construct($data); $this->id = (int)$this->getDataProperty('id'); - $this->installedBy = $this->getDataProperty('installedBy'); + $this->installedBy = $this->nullableArray('installedBy'); $this->identifier = (string)$this->getDataProperty('identifier'); - $this->name = $this->getDataProperty('name'); + $this->name = $this->nullableString('name'); $this->status = (string)$this->getDataProperty('status'); $this->scopes = (array)$this->getDataProperty('scopes'); $this->createdAt = (string)$this->getDataProperty('createdAt'); @@ -49,9 +49,6 @@ public function getId(): int return $this->id; } - /** - * @return array|null - */ public function getInstalledBy(): ?array { return $this->installedBy; diff --git a/src/CrowdinApiClient/Model/ApplicationInstallation.php b/src/CrowdinApiClient/Model/ApplicationInstallation.php index 16d43d0a..4d0cd98b 100644 --- a/src/CrowdinApiClient/Model/ApplicationInstallation.php +++ b/src/CrowdinApiClient/Model/ApplicationInstallation.php @@ -72,13 +72,13 @@ public function __construct(array $data = []) $this->identifier = (string)$this->getDataProperty('identifier'); $this->name = (string)$this->getDataProperty('name'); - $this->installedBy = $this->getDataProperty('installedBy'); - $this->description = $this->getDataProperty('description'); + $this->installedBy = $this->nullableArray('installedBy'); + $this->description = $this->nullableString('description'); $this->logo = (string)$this->getDataProperty('logo'); - $this->agent = $this->getDataProperty('agent'); + $this->agent = $this->nullableArray('agent'); $this->baseUrl = (string)$this->getDataProperty('baseUrl'); $this->manifestUrl = (string)$this->getDataProperty('manifestUrl'); - $this->createdAt = $this->getDataProperty('createdAt'); + $this->createdAt = $this->nullableString('createdAt'); $this->modules = (array)$this->getDataProperty('modules'); $this->scopes = (array)$this->getDataProperty('scopes'); $this->permissions = (array)$this->getDataProperty('permissions'); @@ -102,9 +102,6 @@ public function getName(): string return $this->name; } - /** - * @return array|null - */ public function getInstalledBy(): ?array { return $this->installedBy; @@ -120,9 +117,6 @@ public function getLogo(): string return $this->logo; } - /** - * @return array|null - */ public function getAgent(): ?array { return $this->agent; diff --git a/src/CrowdinApiClient/Model/BranchClone.php b/src/CrowdinApiClient/Model/BranchClone.php index e35b5f8d..b490ec73 100644 --- a/src/CrowdinApiClient/Model/BranchClone.php +++ b/src/CrowdinApiClient/Model/BranchClone.php @@ -57,8 +57,8 @@ public function __construct(array $data = []) $this->attributes = (array)$this->getDataProperty('attributes'); $this->createdAt = (string)$this->getDataProperty('createdAt'); $this->updatedAt = (string)$this->getDataProperty('updatedAt'); - $this->startedAt = $this->getDataProperty('startedAt'); - $this->finishedAt = $this->getDataProperty('finishedAt'); + $this->startedAt = $this->nullableString('startedAt'); + $this->finishedAt = $this->nullableString('finishedAt'); } public function getIdentifier(): string diff --git a/src/CrowdinApiClient/Model/BranchMerge.php b/src/CrowdinApiClient/Model/BranchMerge.php index 7ab9fc3a..82c49bff 100644 --- a/src/CrowdinApiClient/Model/BranchMerge.php +++ b/src/CrowdinApiClient/Model/BranchMerge.php @@ -57,8 +57,8 @@ public function __construct(array $data = []) $this->attributes = (array)$this->getDataProperty('attributes'); $this->createdAt = (string)$this->getDataProperty('createdAt'); $this->updatedAt = (string)$this->getDataProperty('updatedAt'); - $this->startedAt = $this->getDataProperty('startedAt'); - $this->finishedAt = $this->getDataProperty('finishedAt'); + $this->startedAt = $this->nullableString('startedAt'); + $this->finishedAt = $this->nullableString('finishedAt'); } public function getIdentifier(): string diff --git a/src/CrowdinApiClient/Model/DeleteJob.php b/src/CrowdinApiClient/Model/DeleteJob.php index cb3e551b..50756560 100644 --- a/src/CrowdinApiClient/Model/DeleteJob.php +++ b/src/CrowdinApiClient/Model/DeleteJob.php @@ -62,9 +62,9 @@ public function __construct(array $data = []) $this->attributes = (array)$this->getDataProperty('attributes'); $this->createdAt = (string)$this->getDataProperty('createdAt'); $this->updatedAt = (string)$this->getDataProperty('updatedAt'); - $this->startedAt = $this->getDataProperty('startedAt'); - $this->finishedAt = $this->getDataProperty('finishedAt'); - $this->error = $this->getDataProperty('error'); + $this->startedAt = $this->nullableString('startedAt'); + $this->finishedAt = $this->nullableString('finishedAt'); + $this->error = $this->nullableArray('error'); } /** diff --git a/src/CrowdinApiClient/Model/DistributionRelease.php b/src/CrowdinApiClient/Model/DistributionRelease.php index dc511c9a..ffb4e20c 100644 --- a/src/CrowdinApiClient/Model/DistributionRelease.php +++ b/src/CrowdinApiClient/Model/DistributionRelease.php @@ -48,11 +48,11 @@ public function __construct(array $data = []) { parent::__construct($data); - $this->status = (string)$this->getDataProperty('status'); - $this->progress = (int)$this->getDataProperty('progress'); - $this->currentLanguageId = (string)$this->getDataProperty('currentLanguageId'); - $this->currentFileId = (int)$this->getDataProperty('currentFileId'); - $this->date = (string)$this->getDataProperty('date'); + $this->status = $this->nullableString('status'); + $this->progress = $this->nullableInt('progress'); + $this->currentLanguageId = $this->nullableString('currentLanguageId'); + $this->currentFileId = $this->nullableInt('currentFileId'); + $this->date = $this->nullableString('date'); $this->currentBranchId = $this->nullableInt('currentBranchId'); $this->error = (array)$this->getDataProperty('error'); } diff --git a/src/CrowdinApiClient/Model/DownloadFileTranslation.php b/src/CrowdinApiClient/Model/DownloadFileTranslation.php index bca2ae97..ac10138f 100644 --- a/src/CrowdinApiClient/Model/DownloadFileTranslation.php +++ b/src/CrowdinApiClient/Model/DownloadFileTranslation.php @@ -15,7 +15,8 @@ class DownloadFileTranslation extends DownloadFile public function __construct(array $data = []) { parent::__construct($data); - $this->etag = $this->getDataProperty('etag'); + + $this->etag = $this->nullableString('etag'); } /** diff --git a/src/CrowdinApiClient/Model/File.php b/src/CrowdinApiClient/Model/File.php index aabc1d2a..cc65f4b3 100644 --- a/src/CrowdinApiClient/Model/File.php +++ b/src/CrowdinApiClient/Model/File.php @@ -120,7 +120,7 @@ public function __construct(array $data = []) $this->priority = (string)$this->getDataProperty('priority'); $this->importOptions = (array)$this->getDataProperty('importOptions'); $this->exportOptions = (array)$this->getDataProperty('exportOptions'); - $this->excludedTargetLanguages = $this->getDataProperty('excludedTargetLanguages') ? (array)$this->getDataProperty('excludedTargetLanguages') : null; + $this->excludedTargetLanguages = $this->nullableArray('excludedTargetLanguages'); $this->parserVersion = (int)$this->getDataProperty('parserVersion'); $this->createdAt = (string)$this->getDataProperty('createdAt'); $this->updatedAt = (string)$this->getDataProperty('updatedAt'); diff --git a/src/CrowdinApiClient/Model/FileRevision.php b/src/CrowdinApiClient/Model/FileRevision.php index dafc6149..17c8b03a 100644 --- a/src/CrowdinApiClient/Model/FileRevision.php +++ b/src/CrowdinApiClient/Model/FileRevision.php @@ -44,9 +44,7 @@ public function __construct(array $data = []) $this->id = (int)$this->getDataProperty('id'); $this->projectId = (int)$this->getDataProperty('projectId'); $this->fileId = (int)$this->getDataProperty('fileId'); - $this->restoreToRevision = $this->getDataProperty('restoreToRevision') - ? (int)$this->getDataProperty('restoreToRevision') - : null; + $this->restoreToRevision = $this->nullableInt('restoreToRevision'); $this->info = (array)$this->getDataProperty('info'); $this->date = (string)$this->getDataProperty('date'); } diff --git a/src/CrowdinApiClient/Model/HourlyUserReportSettingsTemplate.php b/src/CrowdinApiClient/Model/HourlyUserReportSettingsTemplate.php index efd85ea1..70227821 100644 --- a/src/CrowdinApiClient/Model/HourlyUserReportSettingsTemplate.php +++ b/src/CrowdinApiClient/Model/HourlyUserReportSettingsTemplate.php @@ -26,7 +26,7 @@ public function __construct(array $data = []) $this->currency = (string)$this->getDataProperty('currency'); $this->config = new HourlyReportSettingsTemplateConfig($this->getDataProperty('config') ?? []); $this->createdAt = (string)$this->getDataProperty('createdAt'); - $this->updatedAt = $this->getDataProperty('updatedAt') ? (string)$this->getDataProperty('updatedAt') : null; + $this->updatedAt = $this->nullableString('updatedAt'); } public function getConfig(): HourlyReportSettingsTemplateConfig diff --git a/src/CrowdinApiClient/Model/Language.php b/src/CrowdinApiClient/Model/Language.php index 73f54793..be3b71e2 100644 --- a/src/CrowdinApiClient/Model/Language.php +++ b/src/CrowdinApiClient/Model/Language.php @@ -87,7 +87,7 @@ public function __construct(array $data = []) parent::__construct($data); $this->id = (string)$this->getDataProperty('id'); $this->name = (string)$this->getDataProperty('name'); - $this->dialectOf = (string)$this->getDataProperty('dialectOf'); + $this->dialectOf = $this->nullableString('dialectOf'); $this->textDirection = (string)$this->getDataProperty('textDirection'); $this->editorCode = (string)$this->getDataProperty('editorCode'); $this->pluralCategoryNames = (array)$this->getDataProperty('pluralCategoryNames'); diff --git a/src/CrowdinApiClient/Model/LanguageTranslation.php b/src/CrowdinApiClient/Model/LanguageTranslation.php index 91a8d018..de51d10a 100644 --- a/src/CrowdinApiClient/Model/LanguageTranslation.php +++ b/src/CrowdinApiClient/Model/LanguageTranslation.php @@ -83,15 +83,10 @@ public function __construct(array $data = []) $this->stringId = (int)$this->getDataProperty('stringId'); $this->contentType = (string)$this->getDataProperty('contentType'); - - $this->translationId = $this->getDataProperty('translationId') - ? (int)$this->getDataProperty('translationId') : null; - $this->text = $this->getDataProperty('text') - ? (string)$this->getDataProperty('text') : null; - $this->plurals = $this->getDataProperty('plurals') - ? (array)$this->getDataProperty('plurals') : null; - $this->user = $this->getDataProperty('user') - ? (array)$this->getDataProperty('user') : null; + $this->translationId = $this->nullableInt('translationId'); + $this->text = $this->nullableString('text'); + $this->plurals = $this->nullableArray('plurals'); + $this->user = $this->nullableArray('user'); $this->createdAt = (string)$this->getDataProperty('createdAt'); $this->isPreTranslated = (bool)$this->getDataProperty('isPreTranslated'); $this->matchRate = $this->nullableInt('matchRate'); diff --git a/src/CrowdinApiClient/Model/ProgressFile.php b/src/CrowdinApiClient/Model/ProgressFile.php index f4eaac1e..79ae18ab 100644 --- a/src/CrowdinApiClient/Model/ProgressFile.php +++ b/src/CrowdinApiClient/Model/ProgressFile.php @@ -21,7 +21,7 @@ public function __construct(array $data = []) { parent::__construct($data); - $this->etag = $this->getDataProperty('eTag'); + $this->etag = $this->nullableString('eTag'); $this->qaChecksStatus = (array)$this->getDataProperty('qaChecksStatus'); } diff --git a/src/CrowdinApiClient/Model/ProgressLanguage.php b/src/CrowdinApiClient/Model/ProgressLanguage.php index 442b327e..e08560f4 100644 --- a/src/CrowdinApiClient/Model/ProgressLanguage.php +++ b/src/CrowdinApiClient/Model/ProgressLanguage.php @@ -58,7 +58,7 @@ public function __construct(array $data = []) $this->translationProgress = (int)$this->getDataProperty('translationProgress'); $this->approvalProgress = (int)$this->getDataProperty('approvalProgress'); $this->fileId = (int)$this->getDataProperty('fileId'); - $this->etag = (string)$this->getDataProperty('eTag'); + $this->etag = $this->nullableString('eTag'); $this->branchId = $this->nullableInt('branchId'); $this->qaChecksStatus = (array)$this->getDataProperty('qaChecksStatus'); } diff --git a/src/CrowdinApiClient/Model/Project.php b/src/CrowdinApiClient/Model/Project.php index 16657ce6..27a471ac 100644 --- a/src/CrowdinApiClient/Model/Project.php +++ b/src/CrowdinApiClient/Model/Project.php @@ -183,7 +183,7 @@ class Project extends BaseModel protected $inContextProcessHiddenStrings; /** - * @var ?string + * @var string|null */ protected $inContextPseudoLanguageId; @@ -446,7 +446,7 @@ public function __construct(array $data = []) $this->useGlobalTm = (bool)$this->getDataProperty('useGlobalTm'); $this->inContext = (bool)$this->getDataProperty('inContext'); $this->inContextProcessHiddenStrings = (bool)$this->getDataProperty('inContextProcessHiddenStrings'); - $this->inContextPseudoLanguageId = (string)$this->getDataProperty('inContextPseudoLanguageId'); + $this->inContextPseudoLanguageId = $this->nullableString('inContextPseudoLanguageId'); $this->inContextPseudoLanguage = (array)$this->getDataProperty('inContextPseudoLanguage'); $this->qaCheckIsActive = (bool)$this->getDataProperty('qaCheckIsActive'); $this->qaCheckCategories = (array)$this->getDataProperty('qaCheckCategories'); diff --git a/src/CrowdinApiClient/Model/ReportSettingsTemplate.php b/src/CrowdinApiClient/Model/ReportSettingsTemplate.php index 52cee111..ac094bad 100644 --- a/src/CrowdinApiClient/Model/ReportSettingsTemplate.php +++ b/src/CrowdinApiClient/Model/ReportSettingsTemplate.php @@ -80,7 +80,7 @@ public function __construct(array $data = []) $this->isPublic = (bool)$this->getDataProperty('isPublic'); $this->isGlobal = (bool)$this->getDataProperty('isGlobal'); $this->createdAt = (string)$this->getDataProperty('createdAt'); - $this->updatedAt = $this->getDataProperty('updatedAt') ? (string)$this->getDataProperty('updatedAt') : null; + $this->updatedAt = $this->nullableString('updatedAt'); } public function getId(): int diff --git a/src/CrowdinApiClient/Model/SourceString.php b/src/CrowdinApiClient/Model/SourceString.php index c6b0dcc7..3102969d 100644 --- a/src/CrowdinApiClient/Model/SourceString.php +++ b/src/CrowdinApiClient/Model/SourceString.php @@ -25,12 +25,12 @@ class SourceString extends BaseModel protected $fileId; /** - * @var ?integer + * @var integer|null */ protected $branchId; /** - * @var ?integer + * @var integer|null */ protected $directoryId; @@ -100,7 +100,7 @@ class SourceString extends BaseModel protected $isDuplicate = false; /** - * @var ?integer + * @var integer|null */ protected $masterStringId; @@ -121,12 +121,8 @@ public function __construct(array $data = []) $this->id = (int)$this->getDataProperty('id'); $this->projectId = (int)$this->getDataProperty('projectId'); $this->fileId = (int)$this->getDataProperty('fileId'); - $this->branchId = $this->getDataProperty('branchId') - ? (int)$this->getDataProperty('branchId') - : null; - $this->directoryId = $this->getDataProperty('directoryId') - ? (int)$this->getDataProperty('directoryId') - : null; + $this->branchId = $this->nullableInt('branchId'); + $this->directoryId = $this->nullableInt('directoryId'); $this->identifier = (string)$this->getDataProperty('identifier'); $this->text = is_array($this->getDataProperty('text')) ? $this->getDataProperty('text') @@ -142,7 +138,7 @@ public function __construct(array $data = []) $this->createdAt = (string)$this->getDataProperty('createdAt'); $this->updatedAt = (string)$this->getDataProperty('updatedAt'); $this->isDuplicate = (bool)$this->getDataProperty('isDuplicate'); - $this->masterStringId = $this->getDataProperty('masterStringId'); + $this->masterStringId = $this->nullableInt('masterStringId'); $this->fields = (array)$this->getDataProperty('fields'); $this->webUrl = (string)$this->getDataProperty('webUrl'); } diff --git a/src/CrowdinApiClient/Model/StringComment.php b/src/CrowdinApiClient/Model/StringComment.php index e0098667..87073eec 100644 --- a/src/CrowdinApiClient/Model/StringComment.php +++ b/src/CrowdinApiClient/Model/StringComment.php @@ -48,12 +48,12 @@ class StringComment extends BaseModel protected $type; /** - * @var ?string + * @var string|null */ protected $issueType; /** - * @var ?string + * @var string|null */ protected $issueStatus; @@ -115,6 +115,7 @@ class StringComment extends BaseModel public function __construct(array $data = []) { parent::__construct($data); + $this->id = (int)$this->getDataProperty('id'); $this->text = (string)$this->getDataProperty('text'); $this->userId = (int)$this->getDataProperty('userId'); diff --git a/src/CrowdinApiClient/Model/StringTranslation.php b/src/CrowdinApiClient/Model/StringTranslation.php index c2a2d3c7..5206497f 100644 --- a/src/CrowdinApiClient/Model/StringTranslation.php +++ b/src/CrowdinApiClient/Model/StringTranslation.php @@ -92,15 +92,9 @@ public function __construct(array $data = []) parent::__construct($data); $this->id = (int)$this->getDataProperty('id'); - $this->projectId = $this->getDataProperty('projectId') !== null - ? (int)$this->getDataProperty('projectId') - : null; - $this->stringId = $this->getDataProperty('stringId') !== null - ? (int)$this->getDataProperty('stringId') - : null; - $this->languageId = $this->getDataProperty('languageId') !== null - ? (string)$this->getDataProperty('languageId') - : null; + $this->projectId = $this->nullableInt('projectId'); + $this->stringId = $this->nullableInt('stringId'); + $this->languageId = $this->nullableString('languageId'); $this->text = (string)$this->getDataProperty('text'); $this->createdAt = (string)$this->getDataProperty('createdAt'); $this->pluralCategoryName = (string)$this->getDataProperty('pluralCategoryName'); diff --git a/src/CrowdinApiClient/Model/StringUpload.php b/src/CrowdinApiClient/Model/StringUpload.php index 49e85d3f..0c61efe7 100644 --- a/src/CrowdinApiClient/Model/StringUpload.php +++ b/src/CrowdinApiClient/Model/StringUpload.php @@ -57,8 +57,8 @@ public function __construct(array $data = []) $this->attributes = (array)$this->getDataProperty('attributes'); $this->createdAt = (string)$this->getDataProperty('createdAt'); $this->updatedAt = (string)$this->getDataProperty('updatedAt'); - $this->startedAt = $this->getDataProperty('startedAt'); - $this->finishedAt = $this->getDataProperty('finishedAt'); + $this->startedAt = $this->nullableString('startedAt'); + $this->finishedAt = $this->nullableString('finishedAt'); } public function getIdentifier(): string diff --git a/src/CrowdinApiClient/Model/StyleGuide.php b/src/CrowdinApiClient/Model/StyleGuide.php index abd1cafb..bcbccabe 100644 --- a/src/CrowdinApiClient/Model/StyleGuide.php +++ b/src/CrowdinApiClient/Model/StyleGuide.php @@ -48,10 +48,10 @@ public function __construct(array $data = []) $this->id = (int)$this->getDataProperty('id'); $this->name = (string)$this->getDataProperty('name'); - $this->aiInstructions = $this->getDataProperty('aiInstructions'); + $this->aiInstructions = $this->nullableString('aiInstructions'); $this->userId = (int)$this->getDataProperty('userId'); - $this->languageIds = $this->getDataProperty('languageIds'); - $this->projectIds = $this->getDataProperty('projectIds'); + $this->languageIds = $this->nullableArray('languageIds'); + $this->projectIds = $this->nullableArray('projectIds'); $this->isShared = (bool)$this->getDataProperty('isShared'); $this->webUrl = (string)$this->getDataProperty('webUrl'); $this->downloadLink = (string)$this->getDataProperty('downloadLink'); diff --git a/src/CrowdinApiClient/Model/Task.php b/src/CrowdinApiClient/Model/Task.php index db6585c0..85320b2a 100644 --- a/src/CrowdinApiClient/Model/Task.php +++ b/src/CrowdinApiClient/Model/Task.php @@ -229,7 +229,7 @@ class Task extends BaseModel protected $fields = []; /** - * @var string + * @var string|null */ protected $hash; @@ -258,50 +258,40 @@ public function __construct(array $data = []) $this->type = (int)$this->getDataProperty('type'); $this->status = (string)$this->getDataProperty('status'); $this->title = (string)$this->getDataProperty('title'); - $this->batchId = $this->getDataProperty('batchId') !== null ? (int)$this->getDataProperty('batchId') : null; + $this->batchId = $this->nullableInt('batchId'); $this->assignees = (array)$this->getDataProperty('assignees'); $this->assignedTeams = (array)$this->getDataProperty('assignedTeams'); $this->progress = (array)$this->getDataProperty('progress'); - $this->translateProgress = $this->getDataProperty('translateProgress') - ? (array)$this->getDataProperty('translateProgress') - : null; + $this->translateProgress = $this->nullableArray('translateProgress'); $this->sourceLanguageId = (string)$this->getDataProperty('sourceLanguageId'); $this->targetLanguageId = (string)$this->getDataProperty('targetLanguageId'); $this->description = (string)$this->getDataProperty('description'); $this->translationUrl = (string)$this->getDataProperty('translationUrl'); - $this->webUrl = $this->getDataProperty('webUrl') ? (string)$this->getDataProperty('webUrl') : null; + $this->webUrl = $this->nullableString('webUrl'); $this->wordsCount = (int)$this->getDataProperty('wordsCount'); $this->commentsCount = (int)$this->getDataProperty('commentsCount'); $this->deadline = (string)$this->getDataProperty('deadline'); - $this->startedAt = $this->getDataProperty('startedAt') ? (string)$this->getDataProperty('startedAt') : null; - $this->resolvedAt = $this->getDataProperty('resolvedAt') ? (string)$this->getDataProperty('resolvedAt') : null; + $this->startedAt = $this->nullableString('startedAt'); + $this->resolvedAt = $this->nullableString('resolvedAt'); $this->timeRange = (string)$this->getDataProperty('timeRange'); $this->translationsUpdatedTimeRange = (string)$this->getDataProperty('translationsUpdatedTimeRange'); $this->workflowStepId = (int)$this->getDataProperty('workflowStepId'); - $this->buyUrl = $this->getDataProperty('buyUrl') ? (string)$this->getDataProperty('buyUrl') : null; + $this->buyUrl = $this->nullableString('buyUrl'); $this->createdAt = (string)$this->getDataProperty('createdAt'); $this->updatedAt = (string)$this->getDataProperty('updatedAt'); $this->sourceLanguage = (array)$this->getDataProperty('sourceLanguage'); $this->targetLanguages = (array)$this->getDataProperty('targetLanguages'); - $this->labelIds = $this->getDataProperty('labelIds') !== null - ? (array)$this->getDataProperty('labelIds') - : null; - $this->labelMatchRule = $this->getDataProperty('labelMatchRule') - ? (string)$this->getDataProperty('labelMatchRule') - : null; + $this->labelIds = $this->nullableArray('labelIds'); + $this->labelMatchRule = $this->nullableString('labelMatchRule'); $this->excludeLabelIds = (array)$this->getDataProperty('excludeLabelIds'); - $this->excludeLabelMatchRule = $this->getDataProperty('excludeLabelMatchRule') - ? (string)$this->getDataProperty('excludeLabelMatchRule') - : null; + $this->excludeLabelMatchRule = $this->nullableString('excludeLabelMatchRule'); $this->precedingTaskId = (int)$this->getDataProperty('precedingTaskId'); $this->estimatedCost = (array)$this->getDataProperty('estimatedCost'); $this->actualCost = (array)$this->getDataProperty('actualCost'); $this->generateCostEstimate = (bool)$this->getDataProperty('generateCostEstimate'); $this->generateTranslationCost = (bool)$this->getDataProperty('generateTranslationCost'); - $this->reportSettingsTemplateId = $this->getDataProperty('reportSettingsTemplateId') - ? (int)$this->getDataProperty('reportSettingsTemplateId') - : null; - $this->vendor = $this->getDataProperty('vendor') ? (string)$this->getDataProperty('vendor') : null; + $this->reportSettingsTemplateId = $this->nullableInt('reportSettingsTemplateId'); + $this->vendor = $this->nullableString('vendor'); $this->filesCount = (int)$this->getDataProperty('filesCount'); $this->fileIds = (array)$this->getDataProperty('fileIds'); $this->branchIds = $this->nullableArray('branchIds'); @@ -315,7 +305,7 @@ public function __construct(array $data = []) $this->fields = (array)$this->getDataProperty('fields'); // Deprecated - $this->hash = (string)$this->getDataProperty('hash'); + $this->hash = $this->nullableString('hash'); } /** diff --git a/src/CrowdinApiClient/Model/TaskComment.php b/src/CrowdinApiClient/Model/TaskComment.php index 0986875c..44d6d6e7 100644 --- a/src/CrowdinApiClient/Model/TaskComment.php +++ b/src/CrowdinApiClient/Model/TaskComment.php @@ -50,7 +50,7 @@ public function __construct(array $data = []) $this->userId = (int)$this->getDataProperty('userId'); $this->taskId = (int)$this->getDataProperty('taskId'); $this->text = (string)$this->getDataProperty('text'); - $this->timeSpent = $this->getDataProperty('timeSpent') ? (int)$this->getDataProperty('timeSpent') : null; + $this->timeSpent = $this->nullableInt('timeSpent'); $this->createdAt = (string)$this->getDataProperty('createdAt'); $this->updatedAt = (string)$this->getDataProperty('updatedAt'); } diff --git a/src/CrowdinApiClient/Model/TaskForUpdate.php b/src/CrowdinApiClient/Model/TaskForUpdate.php index 047375ce..b908cd41 100644 --- a/src/CrowdinApiClient/Model/TaskForUpdate.php +++ b/src/CrowdinApiClient/Model/TaskForUpdate.php @@ -63,18 +63,10 @@ public function __construct(array $data = []) : []; $this->skipAssignedStrings = null !== $this->getDataProperty('skipAssignedStrings') && $this->getDataProperty('skipAssignedStrings'); - $this->dateFrom = null !== $this->getDataProperty('dateFrom') - ? (string)$this->getDataProperty('dateFrom') - : null; - $this->dateTo = null !== $this->getDataProperty('dateTo') - ? (string)$this->getDataProperty('dateTo') - : null; - $this->translationsUpdatedDateFrom = null !== $this->getDataProperty('translationsUpdatedDateFrom') - ? (string)$this->getDataProperty('translationsUpdatedDateFrom') - : null; - $this->translationsUpdatedDateTo = null !== $this->getDataProperty('translationsUpdatedDateTo') - ? (string)$this->getDataProperty('translationsUpdatedDateTo') - : null; + $this->dateFrom = $this->nullableString('dateFrom'); + $this->dateTo = $this->nullableString('dateTo'); + $this->translationsUpdatedDateFrom = $this->nullableString('translationsUpdatedDateFrom'); + $this->translationsUpdatedDateTo = $this->nullableString('translationsUpdatedDateTo'); } private function initMissingProperties(): void diff --git a/src/CrowdinApiClient/Model/TranslationMemoryConcordance.php b/src/CrowdinApiClient/Model/TranslationMemoryConcordance.php index a040116d..e79d08db 100644 --- a/src/CrowdinApiClient/Model/TranslationMemoryConcordance.php +++ b/src/CrowdinApiClient/Model/TranslationMemoryConcordance.php @@ -53,8 +53,8 @@ public function __construct(array $data) $this->source = (string)$this->getDataProperty('source'); $this->target = (string)$this->getDataProperty('target'); $this->relevant = (int)$this->getDataProperty('relevant'); - $this->substituted = $this->getDataProperty('substituted'); - $this->updatedAt = $this->getDataProperty('updatedAt'); + $this->substituted = $this->nullableString('substituted'); + $this->updatedAt = $this->nullableString('updatedAt'); } public function getTm(): TranslationMemory diff --git a/src/CrowdinApiClient/Model/TranslationMemorySegmentRecord.php b/src/CrowdinApiClient/Model/TranslationMemorySegmentRecord.php index 89f42a25..9a8db770 100644 --- a/src/CrowdinApiClient/Model/TranslationMemorySegmentRecord.php +++ b/src/CrowdinApiClient/Model/TranslationMemorySegmentRecord.php @@ -38,12 +38,12 @@ class TranslationMemorySegmentRecord extends BaseModel protected $updatedBy; /** - * @var ?string + * @var string|null */ protected $createdAt; /** - * @var ?string + * @var string|null */ protected $updatedAt; @@ -56,8 +56,8 @@ public function __construct(array $data = []) $this->usageCount = (int)$this->getDataProperty('usageCount'); $this->createdBy = (int)$this->getDataProperty('createdBy'); $this->updatedBy = (int)$this->getDataProperty('updatedBy'); - $this->createdAt = (string)$this->getDataProperty('createdAt'); - $this->updatedAt = (string)$this->getDataProperty('updatedAt'); + $this->createdAt = $this->nullableString('createdAt'); + $this->updatedAt = $this->nullableString('updatedAt'); } /** diff --git a/src/CrowdinApiClient/Model/UserReportSettingsTemplate.php b/src/CrowdinApiClient/Model/UserReportSettingsTemplate.php index c2bb9fb1..5df9938c 100644 --- a/src/CrowdinApiClient/Model/UserReportSettingsTemplate.php +++ b/src/CrowdinApiClient/Model/UserReportSettingsTemplate.php @@ -28,7 +28,7 @@ public function __construct(array $data = []) $this->unit = (string)$this->getDataProperty('unit'); $this->config = new ReportSettingsTemplateConfig($this->getDataProperty('config') ?? []); $this->createdAt = (string)$this->getDataProperty('createdAt'); - $this->updatedAt = $this->getDataProperty('updatedAt') ? (string)$this->getDataProperty('updatedAt') : null; + $this->updatedAt = $this->nullableString('updatedAt'); } public function getConfig(): ReportSettingsTemplateConfig From cd6446be78c287a1c3aa025688ec896ab60ab8f4 Mon Sep 17 00:00:00 2001 From: Bohdan Bobko <172895427+bhdnb@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:21:01 +0300 Subject: [PATCH 2/3] test(model): cover nullable hydration helpers --- .../CrowdinApiClient/Model/BaseModelTest.php | 57 +++++++++++++++++++ .../Model/DistributionReleaseTest.php | 11 ++++ .../Model/TaskCommentTest.php | 7 +++ 3 files changed, 75 insertions(+) create mode 100644 tests/CrowdinApiClient/Model/BaseModelTest.php diff --git a/tests/CrowdinApiClient/Model/BaseModelTest.php b/tests/CrowdinApiClient/Model/BaseModelTest.php new file mode 100644 index 00000000..8c091317 --- /dev/null +++ b/tests/CrowdinApiClient/Model/BaseModelTest.php @@ -0,0 +1,57 @@ + ['nullableBool', [], null], + 'bool: null' => ['nullableBool', ['value' => null], null], + 'bool: false is kept' => ['nullableBool', ['value' => false], false], + 'bool: cast' => ['nullableBool', ['value' => 1], true], + + 'int: missing' => ['nullableInt', [], null], + 'int: null' => ['nullableInt', ['value' => null], null], + 'int: zero is kept' => ['nullableInt', ['value' => 0], 0], + 'int: cast' => ['nullableInt', ['value' => '5'], 5], + + 'float: missing' => ['nullableFloat', [], null], + 'float: null' => ['nullableFloat', ['value' => null], null], + 'float: zero is kept' => ['nullableFloat', ['value' => 0.0], 0.0], + 'float: cast' => ['nullableFloat', ['value' => 2], 2.0], + + 'string: missing' => ['nullableString', [], null], + 'string: null' => ['nullableString', ['value' => null], null], + 'string: empty is kept' => ['nullableString', ['value' => ''], ''], + 'string: "0" is kept' => ['nullableString', ['value' => '0'], '0'], + 'string: cast' => ['nullableString', ['value' => 5], '5'], + + 'array: missing' => ['nullableArray', [], null], + 'array: null' => ['nullableArray', ['value' => null], null], + 'array: empty is kept' => ['nullableArray', ['value' => []], []], + 'array: cast' => ['nullableArray', ['value' => 'en'], ['en']], + ]; + } + + /** + * @dataProvider nullableHelperProvider + */ + public function testNullableHelpers(string $helper, array $data, $expected): void + { + $model = new class($data) extends BaseModel { + public function call(string $helper) + { + return $this->{$helper}('value'); + } + }; + + $this->assertSame($expected, $model->call($helper)); + } +} diff --git a/tests/CrowdinApiClient/Model/DistributionReleaseTest.php b/tests/CrowdinApiClient/Model/DistributionReleaseTest.php index 8978e0d2..fffe65ff 100644 --- a/tests/CrowdinApiClient/Model/DistributionReleaseTest.php +++ b/tests/CrowdinApiClient/Model/DistributionReleaseTest.php @@ -65,6 +65,17 @@ public function testLoadAdditionalFields(): void $this->assertSame(['key' => 'value'], $model->getError()); } + public function testNullableFieldsWhenMissing(): void + { + $model = new DistributionRelease([]); + + $this->assertNull($model->getStatus()); + $this->assertNull($model->getProgress()); + $this->assertNull($model->getCurrentLanguageId()); + $this->assertNull($model->getCurrentFileId()); + $this->assertNull($model->getDate()); + } + public function testAdditionalFieldsWhenMissing(): void { $model = new DistributionRelease([]); diff --git a/tests/CrowdinApiClient/Model/TaskCommentTest.php b/tests/CrowdinApiClient/Model/TaskCommentTest.php index cfa8fad2..de441c8a 100644 --- a/tests/CrowdinApiClient/Model/TaskCommentTest.php +++ b/tests/CrowdinApiClient/Model/TaskCommentTest.php @@ -30,6 +30,13 @@ public function testLoadData() $this->assertEquals($this->data['updatedAt'], $taskComment->getUpdatedAt()); } + public function testLoadTimeSpent() + { + $this->assertSame(0, (new TaskComment(['timeSpent' => 0]))->getTimeSpent()); + $this->assertNull((new TaskComment(['timeSpent' => null]))->getTimeSpent()); + $this->assertNull((new TaskComment())->getTimeSpent()); + } + public function testSetData() { $text = 'New task comment text'; From 8d1d56528e5b33d5096c20a6d2eaafd5bb5ead00 Mon Sep 17 00:00:00 2001 From: Bohdan Bobko <172895427+bhdnb@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:35:26 +0300 Subject: [PATCH 3/3] docs(model): drop docblocks that repeat signatures --- src/CrowdinApiClient/Model/Alignment.php | 18 -- src/CrowdinApiClient/Model/Branch.php | 36 --- src/CrowdinApiClient/Model/DeleteJob.php | 27 -- src/CrowdinApiClient/Model/Directory.php | 48 ---- src/CrowdinApiClient/Model/DownloadFile.php | 12 - .../Model/DownloadFilePreview.php | 12 - .../Model/DownloadFileTranslation.php | 6 - .../Model/Enterprise/Group.php | 45 --- .../Model/Enterprise/User.php | 93 ------ .../Model/Enterprise/Vendor.php | 25 +- src/CrowdinApiClient/Model/File.php | 6 - src/CrowdinApiClient/Model/GlossaryExport.php | 48 ---- src/CrowdinApiClient/Model/GlossaryImport.php | 24 -- src/CrowdinApiClient/Model/Group.php | 39 --- .../HourlyUserReportSettingsTemplate.php | 3 - src/CrowdinApiClient/Model/Issue.php | 34 +-- src/CrowdinApiClient/Model/Language.php | 61 +--- .../Model/LanguageTranslation.php | 3 - .../Model/MachineTranslation.php | 12 - .../Model/MachineTranslationEngine.php | 30 -- .../Model/OrganizationWebhook.php | 64 +---- src/CrowdinApiClient/Model/Progress.php | 18 -- .../Model/ProgressLanguage.php | 18 -- src/CrowdinApiClient/Model/Project.php | 270 ------------------ src/CrowdinApiClient/Model/QaCheck.php | 30 -- src/CrowdinApiClient/Model/Report.php | 48 ---- src/CrowdinApiClient/Model/Screenshot.php | 33 --- src/CrowdinApiClient/Model/SecurityLog.php | 24 -- src/CrowdinApiClient/Model/SourceString.php | 66 ----- src/CrowdinApiClient/Model/Storage.php | 6 - src/CrowdinApiClient/Model/StringComment.php | 90 ------ .../Model/StringCorrection.php | 24 -- .../Model/StringTranslation.php | 39 --- .../Model/StringTranslationApproval.php | 42 --- .../Model/StringsExporterSetting.php | 24 -- src/CrowdinApiClient/Model/Tag.php | 21 -- src/CrowdinApiClient/Model/Task.php | 87 ------ src/CrowdinApiClient/Model/TaskComment.php | 27 -- src/CrowdinApiClient/Model/TaskForUpdate.php | 30 -- .../Model/TaskSettingsTemplate.php | 21 -- src/CrowdinApiClient/Model/Term.php | 42 --- .../Model/TranslationMemory.php | 33 --- .../Model/TranslationMemoryConcordance.php | 6 - .../Model/TranslationMemoryExport.php | 48 ---- .../Model/TranslationMemoryImport.php | 48 ---- .../Model/TranslationMemorySegment.php | 6 - .../Model/TranslationMemorySegmentRecord.php | 48 ---- .../Model/TranslationProjectDirectory.php | 42 --- src/CrowdinApiClient/Model/User.php | 30 -- src/CrowdinApiClient/Model/Vote.php | 33 --- src/CrowdinApiClient/Model/Webhook.php | 69 ----- src/CrowdinApiClient/Model/WordAlignment.php | 3 - 52 files changed, 4 insertions(+), 1968 deletions(-) diff --git a/src/CrowdinApiClient/Model/Alignment.php b/src/CrowdinApiClient/Model/Alignment.php index e0a7c3c1..bcde825c 100644 --- a/src/CrowdinApiClient/Model/Alignment.php +++ b/src/CrowdinApiClient/Model/Alignment.php @@ -51,49 +51,31 @@ public function __construct(array $data = []) $this->probability = (float)$this->getDataProperty('probability'); } - /** - * @return string - */ public function getSourceWord(): string { return $this->sourceWord; } - /** - * @return string - */ public function getSourceLemma(): string { return $this->sourceLemma; } - /** - * @return string - */ public function getTargetWord(): string { return $this->targetWord; } - /** - * @return string - */ public function getTargetLemma(): string { return $this->targetLemma; } - /** - * @return int - */ public function getMatch(): int { return $this->match; } - /** - * @return float - */ public function getProbability(): float { return $this->probability; diff --git a/src/CrowdinApiClient/Model/Branch.php b/src/CrowdinApiClient/Model/Branch.php index 34d81bbf..3334968a 100644 --- a/src/CrowdinApiClient/Model/Branch.php +++ b/src/CrowdinApiClient/Model/Branch.php @@ -67,81 +67,51 @@ public function __construct(array $data = []) $this->updatedAt = (string)$this->getDataProperty('updatedAt'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return int - */ public function getProjectId(): int { return $this->projectId; } - /** - * @return string - */ public function getName(): string { return $this->name; } - /** - * @param string $name - */ public function setName(string $name): void { $this->name = $name; } - /** - * @return string - */ public function getTitle(): string { return $this->title; } - /** - * @param string $title - */ public function setTitle(string $title): void { $this->title = $title; } - /** - * @return string - */ public function getExportPattern(): string { return $this->exportPattern; } - /** - * @param string $exportPattern - */ public function setExportPattern(string $exportPattern): void { $this->exportPattern = $exportPattern; } - /** - * @return string - */ public function getPriority(): string { return $this->priority; } - /** - * @param string $priority - */ public function setPriority(string $priority): void { $this->priority = $priority; @@ -152,17 +122,11 @@ public function isProtected(): bool return $this->isProtected; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; diff --git a/src/CrowdinApiClient/Model/DeleteJob.php b/src/CrowdinApiClient/Model/DeleteJob.php index 50756560..11bfd025 100644 --- a/src/CrowdinApiClient/Model/DeleteJob.php +++ b/src/CrowdinApiClient/Model/DeleteJob.php @@ -67,73 +67,46 @@ public function __construct(array $data = []) $this->error = $this->nullableArray('error'); } - /** - * @return string - */ public function getIdentifier(): string { return $this->identifier; } - /** - * @return string - */ public function getStatus(): string { return $this->status; } - /** - * @return int - */ public function getProgress(): int { return $this->progress; } - /** - * @return array - */ public function getAttributes(): array { return $this->attributes; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; } - /** - * @return string|null - */ public function getStartedAt(): ?string { return $this->startedAt; } - /** - * @return string|null - */ public function getFinishedAt(): ?string { return $this->finishedAt; } - /** - * @return array|null - */ public function getError(): ?array { return $this->error; diff --git a/src/CrowdinApiClient/Model/Directory.php b/src/CrowdinApiClient/Model/Directory.php index 6a5b0456..d0587697 100644 --- a/src/CrowdinApiClient/Model/Directory.php +++ b/src/CrowdinApiClient/Model/Directory.php @@ -79,129 +79,81 @@ public function __construct(array $data = []) $this->path = (string)$this->getDataProperty('path'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return int - */ public function getProjectId(): int { return $this->projectId; } - /** - * @return int - */ public function getBranchId(): int { return $this->branchId; } - /** - * @param int $branchId - */ public function setBranchId(int $branchId): void { $this->branchId = $branchId; } - /** - * @return string - */ public function getName(): string { return $this->name; } - /** - * @param string $name - */ public function setName(string $name): void { $this->name = $name; } - /** - * @return string - */ public function getTitle(): string { return $this->title; } - /** - * @param string $title - */ public function setTitle(string $title): void { $this->title = $title; } - /** - * @return string - */ public function getExportPattern(): string { return $this->exportPattern; } - /** - * @param string $exportPattern - */ public function setExportPattern(string $exportPattern): void { $this->exportPattern = $exportPattern; } - /** - * @return string - */ public function getPriority(): string { return $this->priority; } - /** - * @param string $priority - */ public function setPriority(string $priority): void { $this->priority = $priority; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; } - /** - * @return int - */ public function getDirectoryId(): int { return $this->directoryId; } - /** - * @param int $directoryId - */ public function setDirectoryId(int $directoryId): void { $this->directoryId = $directoryId; diff --git a/src/CrowdinApiClient/Model/DownloadFile.php b/src/CrowdinApiClient/Model/DownloadFile.php index 89562c0c..915e2ab4 100644 --- a/src/CrowdinApiClient/Model/DownloadFile.php +++ b/src/CrowdinApiClient/Model/DownloadFile.php @@ -24,33 +24,21 @@ public function __construct(array $data = []) $this->expireIn = (string)$this->getDataProperty('expireIn'); } - /** - * @return string - */ public function getUrl(): string { return $this->url; } - /** - * @param string $url - */ public function setUrl(string $url): void { $this->url = $url; } - /** - * @return string - */ public function getExpireIn(): string { return $this->expireIn; } - /** - * @param string $expireIn - */ public function setExpireIn(string $expireIn): void { $this->expireIn = $expireIn; diff --git a/src/CrowdinApiClient/Model/DownloadFilePreview.php b/src/CrowdinApiClient/Model/DownloadFilePreview.php index 1135b56b..690d6a12 100644 --- a/src/CrowdinApiClient/Model/DownloadFilePreview.php +++ b/src/CrowdinApiClient/Model/DownloadFilePreview.php @@ -24,33 +24,21 @@ public function __construct(array $data = []) $this->expireIn = (string)$this->getDataProperty('expireIn'); } - /** - * @return string - */ public function getUrl(): string { return $this->url; } - /** - * @param string $url - */ public function setUrl(string $url): void { $this->url = $url; } - /** - * @return string - */ public function getExpireIn(): string { return $this->expireIn; } - /** - * @param string $expireIn - */ public function setExpireIn(string $expireIn): void { $this->expireIn = $expireIn; diff --git a/src/CrowdinApiClient/Model/DownloadFileTranslation.php b/src/CrowdinApiClient/Model/DownloadFileTranslation.php index ac10138f..98cfafba 100644 --- a/src/CrowdinApiClient/Model/DownloadFileTranslation.php +++ b/src/CrowdinApiClient/Model/DownloadFileTranslation.php @@ -19,17 +19,11 @@ public function __construct(array $data = []) $this->etag = $this->nullableString('etag'); } - /** - * @return string|null - */ public function getEtag(): ?string { return $this->etag; } - /** - * @param string|null $etag - */ public function setEtag(?string $etag): void { $this->etag = $etag; diff --git a/src/CrowdinApiClient/Model/Enterprise/Group.php b/src/CrowdinApiClient/Model/Enterprise/Group.php index ba5153cf..3e71abd5 100644 --- a/src/CrowdinApiClient/Model/Enterprise/Group.php +++ b/src/CrowdinApiClient/Model/Enterprise/Group.php @@ -89,121 +89,76 @@ public function __construct(array $data = []) $this->savingsReportSettingsTemplateId = (int)$this->getDataProperty('savingsReportSettingsTemplateId'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return string - */ public function getName(): string { return $this->name; } - /** - * @param string $name - */ public function setName(string $name): void { $this->name = $name; } - /** - * @return string - */ public function getDescription(): string { return $this->description; } - /** - * @param string $description - */ public function setDescription(string $description): void { $this->description = $description; } - /** - * @return int - */ public function getParentId(): int { return $this->parentId; } - /** - * @param int $parentId - */ public function setParentId(int $parentId): void { $this->parentId = $parentId; } - /** - * @return int - */ public function getOrganizationId(): int { return $this->organizationId; } - /** - * @return int - */ public function getUserId(): int { return $this->userId; } - /** - * @return int - */ public function getSubgroupsCount(): int { return $this->subgroupsCount; } - /** - * @return int - */ public function getProjectsCount(): int { return $this->projectsCount; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; } - /** - * @return string - */ public function getWebUrl(): string { return $this->webUrl; } - /** - * @return int - */ public function getSavingsReportSettingsTemplateId(): int { return $this->savingsReportSettingsTemplateId; diff --git a/src/CrowdinApiClient/Model/Enterprise/User.php b/src/CrowdinApiClient/Model/Enterprise/User.php index 348d9cca..c0055c97 100644 --- a/src/CrowdinApiClient/Model/Enterprise/User.php +++ b/src/CrowdinApiClient/Model/Enterprise/User.php @@ -137,249 +137,156 @@ public function __construct(array $data = []) $this->mfaMethods = (array)$this->getDataProperty('mfaMethods'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @param int $id - */ public function setId(int $id): void { $this->id = $id; } - /** - * @return string - */ public function getUsername(): string { return $this->username; } - /** - * @param string $username - */ public function setUsername(string $username): void { $this->username = $username; } - /** - * @return string - */ public function getEmail(): string { return $this->email; } - /** - * @param string $email - */ public function setEmail(string $email): void { $this->email = $email; } - /** - * @return string - */ public function getFirstName(): string { return $this->firstName; } - /** - * @param string $firstName - */ public function setFirstName(string $firstName): void { $this->firstName = $firstName; } - /** - * @return string - */ public function getLastName(): string { return $this->lastName; } - /** - * @param string $lastName - */ public function setLastName(string $lastName): void { $this->lastName = $lastName; } - /** - * @return string - */ public function getStatus(): string { return $this->status; } - /** - * @param string $status - */ public function setStatus(string $status): void { $this->status = $status; } - /** - * @return string - */ public function getAvatarUrl(): string { return $this->avatarUrl; } - /** - * @param string $avatarUrl - */ public function setAvatarUrl(string $avatarUrl): void { $this->avatarUrl = $avatarUrl; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @param string $createdAt - */ public function setCreatedAt(string $createdAt): void { $this->createdAt = $createdAt; } - /** - * @return string - */ public function getLastSeen(): string { return $this->lastSeen; } - /** - * @param string $lastSeen - */ public function setLastSeen(string $lastSeen): void { $this->lastSeen = $lastSeen; } - /** - * @return string - */ public function getTwoFactor(): string { return $this->twoFactor; } - /** - * @param string $twoFactor - */ public function setTwoFactor(string $twoFactor): void { $this->twoFactor = $twoFactor; } - /** - * @return bool - */ public function isAdmin(): bool { return $this->isAdmin; } - /** - * @param bool $isAdmin - */ public function setIsAdmin(bool $isAdmin): void { $this->isAdmin = $isAdmin; } - /** - * @return string - */ public function getTimezone(): string { return $this->timezone; } - /** - * @param string $timezone - */ public function setTimezone(string $timezone): void { $this->timezone = $timezone; } - /** - * @return array - */ public function getFields(): array { return $this->fields; } - /** - * @param array $fields - */ public function setFields(array $fields): void { $this->fields = $fields; } - /** - * @return bool - */ public function isEmailVerified(): bool { return $this->emailVerified; } - /** - * @return array - */ public function getJoinDetails(): array { return $this->joinDetails; } - /** - * @return string - */ public function getDeviceVerification(): string { return $this->deviceVerification; } - /** - * @return int - */ public function getTrustedDevicesCount(): int { return $this->trustedDevicesCount; } - /** - * @return int - */ public function getApiTokensCount(): int { return $this->apiTokensCount; diff --git a/src/CrowdinApiClient/Model/Enterprise/Vendor.php b/src/CrowdinApiClient/Model/Enterprise/Vendor.php index 0a2bda99..a1224cda 100644 --- a/src/CrowdinApiClient/Model/Enterprise/Vendor.php +++ b/src/CrowdinApiClient/Model/Enterprise/Vendor.php @@ -37,6 +37,7 @@ class Vendor extends BaseModel public function __construct(array $data = []) { parent::__construct($data); + $this->id = (int)$this->getDataProperty('id'); $this->name = (string)$this->getDataProperty('name'); $this->description = (string)$this->getDataProperty('description'); @@ -44,65 +45,41 @@ public function __construct(array $data = []) $this->webUrl = (string)$this->getDataProperty('webUrl'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @param int $id - */ public function setId(int $id): void { $this->id = $id; } - /** - * @return string - */ public function getName(): string { return $this->name; } - /** - * @param string $name - */ public function setName(string $name): void { $this->name = $name; } - /** - * @return string - */ public function getDescription(): string { return $this->description; } - /** - * @param string $description - */ public function setDescription(string $description): void { $this->description = $description; } - /** - * @return string - */ public function getStatus(): string { return $this->status; } - /** - * @param string $status - */ public function setStatus(string $status): void { $this->status = $status; diff --git a/src/CrowdinApiClient/Model/File.php b/src/CrowdinApiClient/Model/File.php index cc65f4b3..2e82017f 100644 --- a/src/CrowdinApiClient/Model/File.php +++ b/src/CrowdinApiClient/Model/File.php @@ -273,17 +273,11 @@ public function getParserVersion(): int return $this->parserVersion; } - /** - * @return array - */ public function getFields(): array { return $this->fields; } - /** - * @param array $fields - */ public function setFields(array $fields): void { $this->fields = $fields; diff --git a/src/CrowdinApiClient/Model/GlossaryExport.php b/src/CrowdinApiClient/Model/GlossaryExport.php index de84615c..00733fcc 100644 --- a/src/CrowdinApiClient/Model/GlossaryExport.php +++ b/src/CrowdinApiClient/Model/GlossaryExport.php @@ -61,129 +61,81 @@ public function __construct(array $data = []) $this->finishedAt = (string)$this->getDataProperty('finishedAt'); } - /** - * @return string - */ public function getIdentifier(): string { return $this->identifier; } - /** - * @param string $identifier - */ public function setIdentifier(string $identifier): void { $this->identifier = $identifier; } - /** - * @return string - */ public function getStatus(): string { return $this->status; } - /** - * @param string $status - */ public function setStatus(string $status): void { $this->status = $status; } - /** - * @return int - */ public function getProgress(): int { return $this->progress; } - /** - * @param int $progress - */ public function setProgress(int $progress): void { $this->progress = $progress; } - /** - * @return array - */ public function getAttributes(): array { return $this->attributes; } - /** - * @param array $attributes - */ public function setAttributes(array $attributes): void { $this->attributes = $attributes; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @param string $createdAt - */ public function setCreatedAt(string $createdAt): void { $this->createdAt = $createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; } - /** - * @param string $updatedAt - */ public function setUpdatedAt(string $updatedAt): void { $this->updatedAt = $updatedAt; } - /** - * @return string - */ public function getStartedAt(): string { return $this->startedAt; } - /** - * @param string $startedAt - */ public function setStartedAt(string $startedAt): void { $this->startedAt = $startedAt; } - /** - * @return string - */ public function getFinishedAt(): string { return $this->finishedAt; } - /** - * @param string $finishedAt - */ public function setFinishedAt(string $finishedAt): void { $this->finishedAt = $finishedAt; diff --git a/src/CrowdinApiClient/Model/GlossaryImport.php b/src/CrowdinApiClient/Model/GlossaryImport.php index 627ddeca..51cb4e1f 100644 --- a/src/CrowdinApiClient/Model/GlossaryImport.php +++ b/src/CrowdinApiClient/Model/GlossaryImport.php @@ -61,65 +61,41 @@ public function __construct(array $data = []) $this->finishedAt = (string)$this->getDataProperty('finishedAt'); } - /** - * @return string - */ public function getIdentifier(): string { return $this->identifier; } - /** - * @return string - */ public function getStatus(): string { return $this->status; } - /** - * @return int - */ public function getProgress(): int { return $this->progress; } - /** - * @return array - */ public function getAttributes(): array { return $this->attributes; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; } - /** - * @return string - */ public function getStartedAt(): string { return $this->startedAt; } - /** - * @return string - */ public function getFinishedAt(): string { return $this->finishedAt; diff --git a/src/CrowdinApiClient/Model/Group.php b/src/CrowdinApiClient/Model/Group.php index bc8f198a..b37cc616 100644 --- a/src/CrowdinApiClient/Model/Group.php +++ b/src/CrowdinApiClient/Model/Group.php @@ -73,105 +73,66 @@ public function __construct(array $data = []) $this->updatedAt = (string)$this->getDataProperty('updatedAt'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return string - */ public function getName(): string { return $this->name; } - /** - * @param string $name - */ public function setName(string $name): void { $this->name = $name; } - /** - * @return string - */ public function getDescription(): string { return $this->description; } - /** - * @param string $description - */ public function setDescription(string $description): void { $this->description = $description; } - /** - * @return int - */ public function getParentId(): int { return $this->parentId; } - /** - * @param int $parentId - */ public function setParentId(int $parentId): void { $this->parentId = $parentId; } - /** - * @return int - */ public function getOrganizationId(): int { return $this->organizationId; } - /** - * @return int - */ public function getUserId(): int { return $this->userId; } - /** - * @return int - */ public function getSubgroupsCount(): int { return $this->subgroupsCount; } - /** - * @return int - */ public function getProjectsCount(): int { return $this->projectsCount; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; diff --git a/src/CrowdinApiClient/Model/HourlyUserReportSettingsTemplate.php b/src/CrowdinApiClient/Model/HourlyUserReportSettingsTemplate.php index 70227821..a45057d3 100644 --- a/src/CrowdinApiClient/Model/HourlyUserReportSettingsTemplate.php +++ b/src/CrowdinApiClient/Model/HourlyUserReportSettingsTemplate.php @@ -42,9 +42,6 @@ public function setConfig($config): void $this->config = $config; } - /** - * @return array - */ public function toArray(): array { return [ diff --git a/src/CrowdinApiClient/Model/Issue.php b/src/CrowdinApiClient/Model/Issue.php index 8514bbf8..6cd17648 100644 --- a/src/CrowdinApiClient/Model/Issue.php +++ b/src/CrowdinApiClient/Model/Issue.php @@ -60,6 +60,7 @@ class Issue extends BaseModel public function __construct(array $data = []) { parent::__construct($data); + $this->id = (int)$this->getDataProperty('id'); $this->text = (string)$this->getDataProperty('text'); $this->userId = (int)$this->getDataProperty('userId'); @@ -72,89 +73,56 @@ public function __construct(array $data = []) $this->createdAt = (string)$this->getDataProperty('createdAt'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return string - */ public function getText(): string { return $this->text; } - /** - * @return int - */ public function getUserId(): int { return $this->userId; } - /** - * @return int - */ public function getStringId(): int { return $this->stringId; } - /** - * @return array - */ public function getUser(): array { return $this->user; } - /** - * @return array - */ public function getString(): array { return $this->string; } - /** - * @return string - */ public function getLanguageId(): string { return $this->languageId; } - /** - * @return string - */ public function getType(): string { return $this->type; } - /** - * @return string - */ public function getStatus(): string { return $this->status; } - /** - * @param string $status - */ public function setStatus(string $status): void { $this->status = $status; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; diff --git a/src/CrowdinApiClient/Model/Language.php b/src/CrowdinApiClient/Model/Language.php index be3b71e2..b911aad1 100644 --- a/src/CrowdinApiClient/Model/Language.php +++ b/src/CrowdinApiClient/Model/Language.php @@ -85,6 +85,7 @@ class Language extends BaseModel public function __construct(array $data = []) { parent::__construct($data); + $this->id = (string)$this->getDataProperty('id'); $this->name = (string)$this->getDataProperty('name'); $this->dialectOf = $this->nullableString('dialectOf'); @@ -102,161 +103,101 @@ public function __construct(array $data = []) $this->bcp47Code = (string)$this->getDataProperty('bcp47Code'); } - /** - * @return string - */ public function getId(): string { return $this->id; } - /** - * @return string - */ public function getName(): string { return $this->name; } - /** - * @param string $name - */ public function setName(string $name): void { $this->name = $name; } - /** - * @return string|null - */ public function getDialectOf(): ?string { return $this->dialectOf; } - /** - * @param string|null $dialectOf - */ public function setDialectOf(?string $dialectOf): void { $this->dialectOf = $dialectOf; } - /** - * @return string - */ public function getTextDirection(): string { return $this->textDirection; } - /** - * @param string $textDirection - */ public function setTextDirection(string $textDirection): void { $this->textDirection = $textDirection; } - /** - * @return string - */ public function getEditorCode(): string { return $this->editorCode; } - /** - * @return array - */ public function getPluralCategoryNames(): array { return $this->pluralCategoryNames; } - /** - * @param array $pluralCategoryNames - */ public function setPluralCategoryNames(array $pluralCategoryNames): void { $this->pluralCategoryNames = $pluralCategoryNames; } - /** - * @return string - */ public function getPluralRules(): string { return $this->pluralRules; } - /** - * @return array - */ public function getPluralExamples(): array { return $this->pluralExamples; } - /** - * @return string - */ public function getTwoLettersCode(): string { return $this->twoLettersCode; } - /** - * @param string $twoLettersCode - */ public function setTwoLettersCode(string $twoLettersCode): void { $this->twoLettersCode = $twoLettersCode; } - /** - * @return string - */ public function getThreeLettersCode(): string { return $this->threeLettersCode; } - /** - * @param string $threeLettersCode - */ public function setThreeLettersCode(string $threeLettersCode): void { $this->threeLettersCode = $threeLettersCode; } - /** - * @return string - */ public function getLocale(): string { return $this->locale; } - /** - * @return string - */ public function getAndroidCode(): string { return $this->androidCode; } - /** - * @return string - */ public function getOsxCode(): string { return $this->osxCode; } - /** - * @return string - */ public function getOsxLocale(): string { return $this->osxLocale; diff --git a/src/CrowdinApiClient/Model/LanguageTranslation.php b/src/CrowdinApiClient/Model/LanguageTranslation.php index de51d10a..c829626d 100644 --- a/src/CrowdinApiClient/Model/LanguageTranslation.php +++ b/src/CrowdinApiClient/Model/LanguageTranslation.php @@ -74,9 +74,6 @@ class LanguageTranslation extends BaseModel */ protected $qaIssuesStatus; - /** - * @param array $data - */ public function __construct(array $data = []) { parent::__construct($data); diff --git a/src/CrowdinApiClient/Model/MachineTranslation.php b/src/CrowdinApiClient/Model/MachineTranslation.php index 00135344..7d8522b5 100644 --- a/src/CrowdinApiClient/Model/MachineTranslation.php +++ b/src/CrowdinApiClient/Model/MachineTranslation.php @@ -33,33 +33,21 @@ public function __construct(array $data = []) $this->translations = (array)$this->getDataProperty('translations'); } - /** - * @return string - */ public function getSourceLanguageId(): string { return $this->sourceLanguageId; } - /** - * @param string $sourceLanguageId - */ public function setSourceLanguageId(string $sourceLanguageId): void { $this->sourceLanguageId = $sourceLanguageId; } - /** - * @return string - */ public function getTargetLanguageId(): string { return $this->targetLanguageId; } - /** - * @param string $targetLanguageId - */ public function setTargetLanguageId(string $targetLanguageId): void { $this->targetLanguageId = $targetLanguageId; diff --git a/src/CrowdinApiClient/Model/MachineTranslationEngine.php b/src/CrowdinApiClient/Model/MachineTranslationEngine.php index 6c45a60f..8a05fc76 100644 --- a/src/CrowdinApiClient/Model/MachineTranslationEngine.php +++ b/src/CrowdinApiClient/Model/MachineTranslationEngine.php @@ -62,9 +62,6 @@ class MachineTranslationEngine extends BaseModel */ protected $supportedLanguagePairs; - /** - * @param array $data - */ public function __construct(array $data = []) { parent::__construct($data); @@ -82,73 +79,46 @@ public function __construct(array $data = []) $this->supportedLanguagePairs = $this->nullableArray('supportedLanguagePairs'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return int - */ public function getGroupId(): int { return $this->groupId; } - /** - * @return string - */ public function getName(): string { return $this->name; } - /** - * @param string $name - */ public function setName(string $name): void { $this->name = $name; } - /** - * @return string - */ public function getType(): string { return $this->type; } - /** - * @param string $type - */ public function setType(string $type): void { $this->type = $type; } - /** - * @return array - */ public function getCredentials(): array { return $this->credentials; } - /** - * @param array $credentials - */ public function setCredentials(array $credentials): void { $this->credentials = $credentials; } - /** - * @return array - */ public function getProjectIds(): array { return $this->projectIds; diff --git a/src/CrowdinApiClient/Model/OrganizationWebhook.php b/src/CrowdinApiClient/Model/OrganizationWebhook.php index e9a98c3d..aa70c715 100644 --- a/src/CrowdinApiClient/Model/OrganizationWebhook.php +++ b/src/CrowdinApiClient/Model/OrganizationWebhook.php @@ -59,6 +59,7 @@ class OrganizationWebhook extends BaseModel public function __construct(array $data = []) { parent::__construct($data); + $this->id = (string)$this->getDataProperty('id'); $this->name = (string)$this->getDataProperty('name'); $this->url = (string)$this->getDataProperty('url'); @@ -74,169 +75,106 @@ public function __construct(array $data = []) } - /** - * @return string - */ public function getId(): string { return $this->id; } - /** - * @return string - */ public function getName(): string { return $this->name; } - /** - * @param string $name - */ public function setName(string $name): void { $this->name = $name; } - /** - * @return string - */ public function getUrl(): string { return $this->url; } - /** - * @param string $url - */ public function setUrl(string $url): void { $this->url = $url; } - /** - * @return array - */ public function getEvents(): array { return $this->events; } - /** - * @param array $events - */ public function setEvents(array $events): void { $this->events = $events; } - /** - * @return array - */ public function getHeaders(): array { return $this->headers; } - /** - * @param array $headers - */ public function setHeaders(array $headers): void { $this->headers = $headers; } - /** - * @return array - */ public function getPayload(): array { return $this->payload; } - /** - * @param array $payload - */ public function setPayload(array $payload): void { $this->payload = $payload; } - /** - * @return bool - */ public function isActive(): bool { return $this->isActive; } - /** - * @param bool $isActive - */ public function setIsActive(bool $isActive): void { $this->isActive = $isActive; } - /** - * @return bool - */ public function isBatchingEnabled(): bool { return $this->batchingEnabled; } - /** - * @param bool $batchingEnabled - */ public function setBatchingEnabled(bool $batchingEnabled): void { $this->batchingEnabled = $batchingEnabled; } - /** - * @return string - */ public function getRequestType(): string { return $this->requestType; } - /** - * @param string $requestType - */ public function setRequestType(string $requestType): void { $this->requestType = $requestType; } - /** - * @return string - */ public function getContentType(): string { return $this->contentType; } - /** - * @param string $contentType - */ public function setContentType(string $contentType): void { $this->contentType = $contentType; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; diff --git a/src/CrowdinApiClient/Model/Progress.php b/src/CrowdinApiClient/Model/Progress.php index b0326c5c..55826c6e 100644 --- a/src/CrowdinApiClient/Model/Progress.php +++ b/src/CrowdinApiClient/Model/Progress.php @@ -42,9 +42,6 @@ class Progress extends BaseModel */ protected $qaChecksStatus; - /** - * @param array $data - */ public function __construct(array $data = []) { parent::__construct($data); @@ -63,41 +60,26 @@ public function getLanguage(): Language return $this->language; } - /** - * @return string - */ public function getLanguageId(): string { return $this->languageId; } - /** - * @return array - */ public function getWords(): array { return $this->words; } - /** - * @return array - */ public function getPhrases(): array { return $this->phrases; } - /** - * @return int - */ public function getTranslationProgress(): int { return $this->translationProgress; } - /** - * @return int - */ public function getApprovalProgress(): int { return $this->approvalProgress; diff --git a/src/CrowdinApiClient/Model/ProgressLanguage.php b/src/CrowdinApiClient/Model/ProgressLanguage.php index e08560f4..1c91cefa 100644 --- a/src/CrowdinApiClient/Model/ProgressLanguage.php +++ b/src/CrowdinApiClient/Model/ProgressLanguage.php @@ -63,49 +63,31 @@ public function __construct(array $data = []) $this->qaChecksStatus = (array)$this->getDataProperty('qaChecksStatus'); } - /** - * @return array - */ public function getWords(): array { return $this->words; } - /** - * @return array - */ public function getPhrases(): array { return $this->phrases; } - /** - * @return int - */ public function getTranslationProgress(): int { return $this->translationProgress; } - /** - * @return int - */ public function getApprovalProgress(): int { return $this->approvalProgress; } - /** - * @return int - */ public function getFileId(): int { return $this->fileId; } - /** - * @return string|null - */ public function getEtag(): ?string { return $this->etag; diff --git a/src/CrowdinApiClient/Model/Project.php b/src/CrowdinApiClient/Model/Project.php index 27a471ac..cf8de135 100644 --- a/src/CrowdinApiClient/Model/Project.php +++ b/src/CrowdinApiClient/Model/Project.php @@ -494,81 +494,51 @@ public function __construct(array $data = []) $this->webUrl = (string)$this->getDataProperty('webUrl'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @param int $id - */ public function setId(int $id): void { $this->id = $id; } - /** - * @return int - */ public function getGroupId(): int { return $this->groupId; } - /** - * @param int $groupId - */ public function setGroupId(int $groupId): void { $this->groupId = $groupId; } - /** - * @return int - */ public function getUserId(): int { return $this->userId; } - /** - * @param int $userId - */ public function setUserId(int $userId): void { $this->userId = $userId; } - /** - * @return string - */ public function getSourceLanguageId(): string { return $this->sourceLanguageId; } - /** - * @param string $sourceLanguageId - */ public function setSourceLanguageId(string $sourceLanguageId): void { $this->sourceLanguageId = $sourceLanguageId; } - /** - * @return array - */ public function getTargetLanguageIds(): array { return $this->targetLanguageIds; } - /** - * @param array $targetLanguageIds - */ public function setTargetLanguageIds(array $targetLanguageIds): void { $this->targetLanguageIds = $targetLanguageIds; @@ -584,113 +554,71 @@ public function setTargetLanguages(array $targetLanguages): void $this->targetLanguages = $targetLanguages; } - /** - * @return string - */ public function getLanguageAccessPolicy(): string { return $this->languageAccessPolicy; } - /** - * @param string $languageAccessPolicy - */ public function setLanguageAccessPolicy(string $languageAccessPolicy): void { $this->languageAccessPolicy = $languageAccessPolicy; } - /** - * @return string - */ public function getName(): string { return $this->name; } - /** - * @param string $name - */ public function setName(string $name): void { $this->name = $name; } - /** - * @return string - */ public function getCname(): string { return $this->cname; } - /** - * @param string $cname - */ public function setCname(string $cname): void { $this->cname = $cname; } - /** - * @return string - */ public function getIdentifier(): string { return $this->identifier; } - /** - * @param string $identifier - */ public function setIdentifier(string $identifier): void { $this->identifier = $identifier; } - /** - * @return string - */ public function getDescription(): string { return $this->description; } - /** - * @param string $description - */ public function setDescription(string $description): void { $this->description = $description; } - /** - * @return string - */ public function getVisibility(): string { return $this->visibility; } - /** - * @param string $visibility - */ public function setVisibility(string $visibility): void { $this->visibility = $visibility; } - /** - * @return string - */ public function getLogo(): string { return $this->logo; } - /** - * @param string $logo - */ public function setLogo(string $logo): void { $this->logo = $logo; @@ -714,161 +642,101 @@ public function setBackground(string $background): void $this->background = $background; } - /** - * @return bool - */ public function isExternal(): bool { return $this->isExternal; } - /** - * @param bool $isExternal - */ public function setIsExternal(bool $isExternal): void { $this->isExternal = $isExternal; } - /** - * @return string - */ public function getExternalType(): string { return $this->externalType; } - /** - * @param string $externalType - */ public function setExternalType(string $externalType): void { $this->externalType = $externalType; } - /** - * @return int - */ public function getWorkflowId(): int { return $this->workflowId; } - /** - * @param int $workflowId - */ public function setWorkflowId(int $workflowId): void { $this->workflowId = $workflowId; } - /** - * @return bool - */ public function isHasCrowdsourcing(): bool { return $this->hasCrowdsourcing; } - /** - * @param bool $hasCrowdsourcing - */ public function setHasCrowdsourcing(bool $hasCrowdsourcing): void { $this->hasCrowdsourcing = $hasCrowdsourcing; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @param string $createdAt - */ public function setCreatedAt(string $createdAt): void { $this->createdAt = $createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; } - /** - * @param string $updatedAt - */ public function setUpdatedAt(string $updatedAt): void { $this->updatedAt = $updatedAt; } - /** - * @return string - */ public function getLastActivity(): string { return $this->lastActivity; } - /** - * @param string $lastActivity - */ public function setLastActivity(string $lastActivity): void { $this->lastActivity = $lastActivity; } - /** - * @return int - */ public function getTranslateDuplicates(): int { return $this->translateDuplicates; } - /** - * @param int $translateDuplicates - */ public function setTranslateDuplicates(int $translateDuplicates): void { $this->translateDuplicates = $translateDuplicates; } - /** - * @return bool - */ public function isMtAllowed(): bool { return $this->isMtAllowed; } - /** - * @param bool $isMtAllowed - */ public function setIsMtAllowed(bool $isMtAllowed): void { $this->isMtAllowed = $isMtAllowed; } - /** - * @return bool - */ public function isAutoSubstitution(): bool { return $this->autoSubstitution; } - /** - * @param bool $autoSubstitution - */ public function setAutoSubstitution(bool $autoSubstitution): void { $this->autoSubstitution = $autoSubstitution; @@ -884,209 +752,131 @@ public function setExportTranslatedOnly(bool $exportTranslatedOnly): void $this->exportTranslatedOnly = $exportTranslatedOnly; } - /** - * @return bool - */ public function isSkipUntranslatedStrings(): bool { return $this->skipUntranslatedStrings; } - /** - * @param bool $skipUntranslatedStrings - */ public function setSkipUntranslatedStrings(bool $skipUntranslatedStrings): void { $this->skipUntranslatedStrings = $skipUntranslatedStrings; } - /** - * @return bool - */ public function isSkipUntranslatedFiles(): bool { return $this->skipUntranslatedFiles; } - /** - * @param bool $skipUntranslatedFiles - */ public function setSkipUntranslatedFiles(bool $skipUntranslatedFiles): void { $this->skipUntranslatedFiles = $skipUntranslatedFiles; } - /** - * @return int - */ public function getExportWithMinApprovalsCount(): int { return $this->exportWithMinApprovalsCount; } - /** - * @param int $exportWithMinApprovalsCount - */ public function setExportWithMinApprovalsCount(int $exportWithMinApprovalsCount): void { $this->exportWithMinApprovalsCount = $exportWithMinApprovalsCount; } - /** - * @return bool - */ public function isExportApprovedOnly(): bool { return $this->exportApprovedOnly; } - /** - * @param bool $exportApprovedOnly - */ public function setExportApprovedOnly(bool $exportApprovedOnly): void { $this->exportApprovedOnly = $exportApprovedOnly; } - /** - * @return bool - */ public function isAutoTranslateDialects(): bool { return $this->autoTranslateDialects; } - /** - * @param bool $autoTranslateDialects - */ public function setAutoTranslateDialects(bool $autoTranslateDialects): void { $this->autoTranslateDialects = $autoTranslateDialects; } - /** - * @return bool - */ public function isPublicDownloads(): bool { return $this->publicDownloads; } - /** - * @param bool $publicDownloads - */ public function setPublicDownloads(bool $publicDownloads): void { $this->publicDownloads = $publicDownloads; } - /** - * @return bool - */ public function isHiddenStringsProofreadersAccess(): bool { return $this->hiddenStringsProofreadersAccess; } - /** - * @param bool $hiddenStringsProofreadersAccess - */ public function setHiddenStringsProofreadersAccess(bool $hiddenStringsProofreadersAccess): void { $this->hiddenStringsProofreadersAccess = $hiddenStringsProofreadersAccess; } - /** - * @return bool - */ public function isUseGlobalTm(): bool { return $this->useGlobalTm; } - /** - * @param bool $useGlobalTm - */ public function setUseGlobalTm(bool $useGlobalTm): void { $this->useGlobalTm = $useGlobalTm; } - /** - * @return bool - */ public function isInContext(): bool { return $this->inContext; } - /** - * @param bool $inContext - */ public function setInContext(bool $inContext): void { $this->inContext = $inContext; } - /** - * @return bool - */ public function isInContextProcessHiddenStrings(): bool { return $this->inContextProcessHiddenStrings; } - /** - * @param bool $inContextProcessHiddenStrings - */ public function setInContextProcessHiddenStrings(bool $inContextProcessHiddenStrings): void { $this->inContextProcessHiddenStrings = $inContextProcessHiddenStrings; } - /** - * @return bool - */ public function isQaCheckIsActive(): bool { return $this->qaCheckIsActive; } - /** - * @param bool $qaCheckIsActive - */ public function setQaCheckIsActive(bool $qaCheckIsActive): void { $this->qaCheckIsActive = $qaCheckIsActive; } - /** - * @return array - */ public function getQaCheckCategories(): array { return $this->qaCheckCategories; } - /** - * @param array $qaCheckCategories - */ public function setQaCheckCategories(array $qaCheckCategories): void { $this->qaCheckCategories = $qaCheckCategories; } - /** - * @return array - */ public function getQaChecksIgnorableCategories(): array { return $this->qaChecksIgnorableCategories; } - /** - * @param array $qaChecksIgnorableCategories - */ public function setQaChecksIgnorableCategories(array $qaChecksIgnorableCategories): void { $this->qaChecksIgnorableCategories = $qaChecksIgnorableCategories; @@ -1100,9 +890,6 @@ public function getCustomQaCheckIds(): array return $this->customQaCheckIds; } - /** - * @param array $customQaCheckIds - */ public function setCustomQaCheckIds(array $customQaCheckIds): void { $this->customQaCheckIds = $customQaCheckIds; @@ -1116,41 +903,26 @@ public function getInContextPseudoLanguageId(): ?string return $this->inContextPseudoLanguageId; } - /** - * @param ?string $inContextPseudoLanguageId - */ public function setInContextPseudoLanguageId(?string $inContextPseudoLanguageId): void { $this->inContextPseudoLanguageId = $inContextPseudoLanguageId; } - /** - * @return array - */ public function getInContextPseudoLanguage(): array { return $this->inContextPseudoLanguage; } - /** - * @param array $inContextPseudoLanguage - */ public function setInContextPseudoLanguage(array $inContextPseudoLanguage): void { $this->inContextPseudoLanguage = $inContextPseudoLanguage; } - /** - * @return array - */ public function getLanguageMapping(): array { return $this->languageMapping; } - /** - * @param array $languageMapping - */ public function setLanguageMapping(array $languageMapping): void { $this->languageMapping = $languageMapping; @@ -1190,113 +962,71 @@ public function setGlossaryAccessOption(string $glossaryAccessOption): void $this->glossaryAccessOption = $glossaryAccessOption; } - /** - * @return bool - */ public function isSuspended(): bool { return $this->isSuspended; } - /** - * @param bool $isSuspended - */ public function setIsSuspended(bool $isSuspended): void { $this->isSuspended = $isSuspended; } - /** - * @return bool - */ public function isNormalizePlaceholder(): bool { return $this->normalizePlaceholder; } - /** - * @param bool $normalizePlaceholder - */ public function setNormalizePlaceholder(bool $normalizePlaceholder): void { $this->normalizePlaceholder = $normalizePlaceholder; } - /** - * @return bool - */ public function isSaveMetaInfoInSource(): bool { return $this->saveMetaInfoInSource; } - /** - * @param bool $saveMetaInfoInSource - */ public function setSaveMetaInfoInSource(bool $saveMetaInfoInSource): void { $this->saveMetaInfoInSource = $saveMetaInfoInSource; } - /** - * @return array - */ public function getNotificationSettings(): array { return $this->notificationSettings; } - /** - * @param array $notificationSettings - */ public function setNotificationSettings(array $notificationSettings): void { $this->notificationSettings = $notificationSettings; } - /** - * @return int|null - */ public function getDefaultTmId(): ?int { return $this->defaultTmId; } - /** - * @param int|null $defaultTmId - */ public function setDefaultTmId(?int $defaultTmId): void { $this->defaultTmId = $defaultTmId; } - /** - * @return int|null - */ public function getDefaultGlossaryId(): ?int { return $this->defaultGlossaryId; } - /** - * @param int|null $defaultGlossaryId - */ public function setDefaultGlossaryId(?int $defaultGlossaryId): void { $this->defaultGlossaryId = $defaultGlossaryId; } - /** - * @return array - */ public function getFields(): array { return $this->fields; } - /** - * @param array $fields - */ public function setFields(array $fields): void { $this->fields = $fields; diff --git a/src/CrowdinApiClient/Model/QaCheck.php b/src/CrowdinApiClient/Model/QaCheck.php index 59827a09..d2ad0597 100644 --- a/src/CrowdinApiClient/Model/QaCheck.php +++ b/src/CrowdinApiClient/Model/QaCheck.php @@ -72,81 +72,51 @@ public function __construct(array $data = []) $this->translation = $this->nullableString('translation'); } - /** - * @return int - */ public function getStringId(): int { return $this->stringId; } - /** - * @return string - */ public function getLanguageId(): string { return $this->languageId; } - /** - * @return string - */ public function getCategory(): string { return $this->category; } - /** - * @return string - */ public function getCategoryDescription(): string { return $this->categoryDescription; } - /** - * @return string - */ public function getValidation(): string { return $this->validation; } - /** - * @return string - */ public function getValidationDescription(): string { return $this->validationDescription; } - /** - * @return int - */ public function getPluralId(): int { return $this->pluralId; } - /** - * @return string - */ public function getText(): string { return $this->text; } - /** - * @return string|null - */ public function getPluralCategoryName(): ?string { return $this->pluralCategoryName; } - /** - * @return string|null - */ public function getTranslation(): ?string { return $this->translation; diff --git a/src/CrowdinApiClient/Model/Report.php b/src/CrowdinApiClient/Model/Report.php index ba67962a..8e7ef35a 100644 --- a/src/CrowdinApiClient/Model/Report.php +++ b/src/CrowdinApiClient/Model/Report.php @@ -125,129 +125,81 @@ public function __construct(array $data = []) $this->finishedAt = (string)$this->getDataProperty('finishedAt'); } - /** - * @return string - */ public function getIdentifier(): string { return $this->identifier; } - /** - * @param string $identifier - */ public function setIdentifier(string $identifier): void { $this->identifier = $identifier; } - /** - * @return string - */ public function getStatus(): string { return $this->status; } - /** - * @param string $status - */ public function setStatus(string $status): void { $this->status = $status; } - /** - * @return int - */ public function getProgress(): int { return $this->progress; } - /** - * @param int $progress - */ public function setProgress(int $progress): void { $this->progress = $progress; } - /** - * @return array - */ public function getAttributes(): array { return $this->attributes; } - /** - * @param array $attributes - */ public function setAttributes(array $attributes): void { $this->attributes = $attributes; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @param string $createdAt - */ public function setCreatedAt(string $createdAt): void { $this->createdAt = $createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; } - /** - * @param string $updatedAt - */ public function setUpdatedAt(string $updatedAt): void { $this->updatedAt = $updatedAt; } - /** - * @return string - */ public function getStartedAt(): string { return $this->startedAt; } - /** - * @param string $startedAt - */ public function setStartedAt(string $startedAt): void { $this->startedAt = $startedAt; } - /** - * @return string - */ public function getFinishedAt(): string { return $this->finishedAt; } - /** - * @param string $finishedAt - */ public function setFinishedAt(string $finishedAt): void { $this->finishedAt = $finishedAt; diff --git a/src/CrowdinApiClient/Model/Screenshot.php b/src/CrowdinApiClient/Model/Screenshot.php index de52df4b..74185523 100644 --- a/src/CrowdinApiClient/Model/Screenshot.php +++ b/src/CrowdinApiClient/Model/Screenshot.php @@ -78,17 +78,11 @@ public function __construct(array $data = []) $this->labelIds = (array)$this->getDataProperty('labelIds'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return int - */ public function getUserId(): int { return $this->userId; @@ -103,73 +97,46 @@ public function getUrl(): string return $this->url; } - /** - * @return string|null - */ public function getWebUrl(): ?string { return $this->webUrl; } - /** - * @return string - */ public function getName(): string { return $this->name; } - /** - * @param string $name - */ public function setName(string $name): void { $this->name = $name; } - /** - * @return array - */ public function getSize(): array { return $this->size; } - /** - * @return int - */ public function getTagsCount(): int { return $this->tagsCount; } - /** - * @return array - */ public function getTags(): array { return $this->tags; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; } - /** - * @return array - */ public function getLabelIds(): array { return $this->labelIds; diff --git a/src/CrowdinApiClient/Model/SecurityLog.php b/src/CrowdinApiClient/Model/SecurityLog.php index 43bf326c..f3b121a9 100644 --- a/src/CrowdinApiClient/Model/SecurityLog.php +++ b/src/CrowdinApiClient/Model/SecurityLog.php @@ -61,65 +61,41 @@ public function __construct(array $data = []) $this->createdAt = (string)$this->getDataProperty('createdAt'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return string - */ public function getEvent(): string { return $this->event; } - /** - * @return string - */ public function getInfo(): string { return $this->info; } - /** - * @return int - */ public function getUserId(): int { return $this->userId; } - /** - * @return string - */ public function getLocation(): string { return $this->location; } - /** - * @return string - */ public function getIpAddress(): string { return $this->ipAddress; } - /** - * @return string - */ public function getDeviceName(): string { return $this->deviceName; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; diff --git a/src/CrowdinApiClient/Model/SourceString.php b/src/CrowdinApiClient/Model/SourceString.php index 3102969d..b79316a8 100644 --- a/src/CrowdinApiClient/Model/SourceString.php +++ b/src/CrowdinApiClient/Model/SourceString.php @@ -143,49 +143,31 @@ public function __construct(array $data = []) $this->webUrl = (string)$this->getDataProperty('webUrl'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return int - */ public function getProjectId(): int { return $this->projectId; } - /** - * @return int - */ public function getFileId(): int { return $this->fileId; } - /** - * @return int|null - */ public function getBranchId(): ?int { return $this->branchId; } - /** - * @return int|null - */ public function getDirectoryId(): ?int { return $this->directoryId; } - /** - * @return string - */ public function getIdentifier(): string { return $this->identifier; @@ -223,65 +205,41 @@ public function setText($text): void $this->text = $text; } - /** - * @return string - */ public function getType(): string { return $this->type; } - /** - * @return string - */ public function getContext(): string { return $this->context; } - /** - * @param string $context - */ public function setContext(string $context): void { $this->context = $context; } - /** - * @return int - */ public function getMaxLength(): int { return $this->maxLength; } - /** - * @param int $maxLength - */ public function setMaxLength(int $maxLength): void { $this->maxLength = $maxLength; } - /** - * @return bool - */ public function isHidden(): bool { return $this->isHidden; } - /** - * @param bool $isHidden - */ public function setIsHidden(bool $isHidden): void { $this->isHidden = $isHidden; } - /** - * @return int - */ public function getRevision(): int { return $this->revision; @@ -315,65 +273,41 @@ public function isIcu(): bool return $this->isIcu; } - /** - * @return array - */ public function getLabelIds(): array { return $this->labelIds; } - /** - * @param array $labelIds - */ public function setLabelIds(array $labelIds): void { $this->labelIds = $labelIds; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; } - /** - * @return bool - */ public function isDuplicate(): bool { return $this->isDuplicate; } - /** - * @return int|null - */ public function getMasterStringId(): ?int { return $this->masterStringId; } - /** - * @return array - */ public function getFields(): array { return $this->fields; } - /** - * @param array $fields - */ public function setFields(array $fields): void { $this->fields = $fields; diff --git a/src/CrowdinApiClient/Model/Storage.php b/src/CrowdinApiClient/Model/Storage.php index c95c13e2..a89b8c91 100644 --- a/src/CrowdinApiClient/Model/Storage.php +++ b/src/CrowdinApiClient/Model/Storage.php @@ -24,17 +24,11 @@ public function __construct(array $data = []) $this->fileName = (string)$this->getDataProperty('fileName'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return string - */ public function getFileName(): string { return $this->fileName; diff --git a/src/CrowdinApiClient/Model/StringComment.php b/src/CrowdinApiClient/Model/StringComment.php index 87073eec..d2d61f56 100644 --- a/src/CrowdinApiClient/Model/StringComment.php +++ b/src/CrowdinApiClient/Model/StringComment.php @@ -139,241 +139,151 @@ public function __construct(array $data = []) $this->senderOrganization = $this->nullableArray('senderOrganization'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @param int $id - */ public function setId(int $id): void { $this->id = $id; } - /** - * @return string - */ public function getText(): string { return $this->text; } - /** - * @param string $text - */ public function setText(string $text): void { $this->text = $text; } - /** - * @return int - */ public function getUserId(): int { return $this->userId; } - /** - * @param int $userId - */ public function setUserId(int $userId): void { $this->userId = $userId; } - /** - * @return int - */ public function getStringId(): int { return $this->stringId; } - /** - * @param int $stringId - */ public function setStringId(int $stringId): void { $this->stringId = $stringId; } - /** - * @return array - */ public function getUser(): array { return $this->user; } - /** - * @param array $user - */ public function setUser(array $user): void { $this->user = $user; } - /** - * @return array - */ public function getString(): array { return $this->string; } - /** - * @param array $string - */ public function setString(array $string): void { $this->string = $string; } - /** - * @return string - */ public function getLanguageId(): string { return $this->languageId; } - /** - * @param string $languageId - */ public function setLanguageId(string $languageId): void { $this->languageId = $languageId; } - /** - * @return string - */ public function getType(): string { return $this->type; } - /** - * @param string $type - */ public function setType(string $type): void { $this->type = $type; } - /** - * @return string|null - */ public function getIssueType(): ?string { return $this->issueType; } - /** - * @param string|null $issueType - */ public function setIssueType(?string $issueType): void { $this->issueType = $issueType; } - /** - * @return string|null - */ public function getIssueStatus(): ?string { return $this->issueStatus; } - /** - * @param string|null $issueStatus - */ public function setIssueStatus(?string $issueStatus): void { $this->issueStatus = $issueStatus; } - /** - * @return int - */ public function getResolverId(): int { return $this->resolverId; } - /** - * @param int $resolverId - */ public function setResolverId(int $resolverId): void { $this->resolverId = $resolverId; } - /** - * @return array - */ public function getResolver(): array { return $this->resolver; } - /** - * @param array $resolver - */ public function setResolver(array $resolver): void { $this->resolver = $resolver; } - /** - * @return string - */ public function getResolvedAt(): string { return $this->resolvedAt; } - /** - * @param string $resolvedAt - */ public function setResolvedAt(string $resolvedAt): void { $this->resolvedAt = $resolvedAt; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @param string $createdAt - */ public function setCreatedAt(string $createdAt): void { $this->createdAt = $createdAt; } - /** - * @return array - */ public function getAttachments(): array { return $this->attachments; } - /** - * @param array $attachments - */ public function setAttachments(array $attachments): void { $this->attachments = $attachments; diff --git a/src/CrowdinApiClient/Model/StringCorrection.php b/src/CrowdinApiClient/Model/StringCorrection.php index 1637eeb5..303e41fb 100644 --- a/src/CrowdinApiClient/Model/StringCorrection.php +++ b/src/CrowdinApiClient/Model/StringCorrection.php @@ -43,65 +43,41 @@ public function __construct(array $data = []) $this->createdAt = (string)$this->getDataProperty('createdAt'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return string - */ public function getText(): string { return $this->text; } - /** - * @param string $text - */ public function setText(string $text): void { $this->text = $text; } - /** - * @return string - */ public function getPluralCategoryName(): string { return $this->pluralCategoryName; } - /** - * @param string $pluralCategoryName - */ public function setPluralCategoryName(string $pluralCategoryName): void { $this->pluralCategoryName = $pluralCategoryName; } - /** - * @return array - */ public function getUser(): array { return $this->user; } - /** - * @param array $user - */ public function setUser(array $user): void { $this->user = $user; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; diff --git a/src/CrowdinApiClient/Model/StringTranslation.php b/src/CrowdinApiClient/Model/StringTranslation.php index 5206497f..05215388 100644 --- a/src/CrowdinApiClient/Model/StringTranslation.php +++ b/src/CrowdinApiClient/Model/StringTranslation.php @@ -109,105 +109,66 @@ public function __construct(array $data = []) $this->workflowStepId = $this->nullableInt('workflowStepId'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @param int $id - */ public function setId(int $id): void { $this->id = $id; } - /** - * @return int|null - */ public function getProjectId(): ?int { return $this->projectId; } - /** - * @return int|null - */ public function getStringId(): ?int { return $this->stringId; } - /** - * @return string|null - */ public function getLanguageId(): ?string { return $this->languageId; } - /** - * @return string - */ public function getText(): string { return $this->text; } - /** - * @param string $text - */ public function setText(string $text): void { $this->text = $text; } - /** - * @return string - */ public function getPluralCategoryName(): string { return $this->pluralCategoryName; } - /** - * @param string $pluralCategoryName - */ public function setPluralCategoryName(string $pluralCategoryName): void { $this->pluralCategoryName = $pluralCategoryName; } - /** - * @return array - */ public function getUser(): array { return $this->user; } - /** - * @param array $user - */ public function setUser(array $user): void { $this->user = $user; } - /** - * @return int - */ public function getRating(): int { return $this->rating; } - /** - * @param int $rating - */ public function setRating(int $rating): void { $this->rating = $rating; diff --git a/src/CrowdinApiClient/Model/StringTranslationApproval.php b/src/CrowdinApiClient/Model/StringTranslationApproval.php index 08d78b29..13a3ab1b 100644 --- a/src/CrowdinApiClient/Model/StringTranslationApproval.php +++ b/src/CrowdinApiClient/Model/StringTranslationApproval.php @@ -61,113 +61,71 @@ public function __construct(array $data = []) $this->fileId = (int)$this->getDataProperty('fileId'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @param int $id - */ public function setId(int $id): void { $this->id = $id; } - /** - * @return array - */ public function getUser(): array { return $this->user; } - /** - * @param array $user - */ public function setUser(array $user): void { $this->user = $user; } - /** - * @return int - */ public function getTranslationId(): int { return $this->translationId; } - /** - * @param int $translationId - */ public function setTranslationId(int $translationId): void { $this->translationId = $translationId; } - /** - * @return int - */ public function getStringId(): int { return $this->stringId; } - /** - * @param int $stringId - */ public function setStringId(int $stringId): void { $this->stringId = $stringId; } - /** - * @return string - */ public function getLanguageId(): string { return $this->languageId; } - /** - * @param string $languageId - */ public function setLanguageId(string $languageId): void { $this->languageId = $languageId; } - /** - * @return int - */ public function getWorkflowStepId(): int { return $this->workflowStepId; } - /** - * @param int $workflowStepId - */ public function setWorkflowStepId(int $workflowStepId): void { $this->workflowStepId = $workflowStepId; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @param string $createdAt - */ public function setCreatedAt(string $createdAt): void { $this->createdAt = $createdAt; diff --git a/src/CrowdinApiClient/Model/StringsExporterSetting.php b/src/CrowdinApiClient/Model/StringsExporterSetting.php index 906b4a65..23c16a74 100644 --- a/src/CrowdinApiClient/Model/StringsExporterSetting.php +++ b/src/CrowdinApiClient/Model/StringsExporterSetting.php @@ -43,65 +43,41 @@ public function __construct(array $data = []) $this->updatedAt = (string)$this->getDataProperty('updatedAt'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @param int $id - */ public function setId(int $id): void { $this->id = $id; } - /** - * @return string - */ public function getFormat(): string { return $this->format; } - /** - * @param string $format - */ public function setFormat(string $format): void { $this->format = $format; } - /** - * @return array - */ public function getSettings(): array { return $this->settings; } - /** - * @param array $settings - */ public function setSettings(array $settings): void { $this->settings = $settings; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; diff --git a/src/CrowdinApiClient/Model/Tag.php b/src/CrowdinApiClient/Model/Tag.php index 21d47582..cc641f0b 100644 --- a/src/CrowdinApiClient/Model/Tag.php +++ b/src/CrowdinApiClient/Model/Tag.php @@ -42,57 +42,36 @@ public function __construct(array $data = []) $this->createdAt = (string)$this->getDataProperty('createdAt'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return int - */ public function getScreenshotId(): int { return $this->screenshotId; } - /** - * @return int - */ public function getStringId(): int { return $this->stringId; } - /** - * @param int $stringId - */ public function setStringId(int $stringId): void { $this->stringId = $stringId; } - /** - * @return array - */ public function getPosition(): array { return $this->position; } - /** - * @param array $position - */ public function setPosition(array $position): void { $this->position = $position; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; diff --git a/src/CrowdinApiClient/Model/Task.php b/src/CrowdinApiClient/Model/Task.php index 85320b2a..3bfebcf3 100644 --- a/src/CrowdinApiClient/Model/Task.php +++ b/src/CrowdinApiClient/Model/Task.php @@ -308,65 +308,41 @@ public function __construct(array $data = []) $this->hash = $this->nullableString('hash'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return int - */ public function getProjectId(): int { return $this->projectId; } - /** - * @return int - */ public function getCreatorId(): int { return $this->creatorId; } - /** - * @return int - */ public function getType(): int { return $this->type; } - /** - * @return string - */ public function getStatus(): string { return $this->status; } - /** - * @param string $status - */ public function setStatus(string $status): void { $this->status = $status; } - /** - * @return string - */ public function getTitle(): string { return $this->title; } - /** - * @param string $title - */ public function setTitle(string $title): void { $this->title = $title; @@ -377,17 +353,11 @@ public function getBatchId(): ?int return $this->batchId; } - /** - * @return array - */ public function getAssignees(): array { return $this->assignees; } - /** - * @param array $assignees - */ public function setAssignees(array $assignees): void { $this->assignees = $assignees; @@ -403,9 +373,6 @@ public function setAssignedTeams(array $assignedTeams): void $this->assignedTeams = $assignedTeams; } - /** - * @return array - */ public function getProgress(): array { return $this->progress; @@ -420,41 +387,26 @@ public function getTranslateProgress(): ?array return $this->translateProgress; } - /** - * @return string - */ public function getSourceLanguageId(): string { return $this->sourceLanguageId; } - /** - * @return string - */ public function getTargetLanguageId(): string { return $this->targetLanguageId; } - /** - * @return string - */ public function getDescription(): string { return $this->description; } - /** - * @param string $description - */ public function setDescription(string $description): void { $this->description = $description; } - /** - * @return string - */ public function getTranslationUrl(): string { return $this->translationUrl; @@ -465,33 +417,21 @@ public function getWebUrl(): ?string return $this->webUrl; } - /** - * @return int - */ public function getWordsCount(): int { return $this->wordsCount; } - /** - * @return int - */ public function getCommentsCount(): int { return $this->commentsCount; } - /** - * @return string - */ public function getDeadline(): string { return $this->deadline; } - /** - * @param string $deadline - */ public function setDeadline(string $deadline): void { $this->deadline = $deadline; @@ -517,9 +457,6 @@ public function setResolvedAt(?string $resolvedAt): void $this->resolvedAt = $resolvedAt; } - /** - * @return string - */ public function getTimeRange(): string { return $this->timeRange; @@ -530,9 +467,6 @@ public function getTranslationsUpdatedTimeRange(): string return $this->translationsUpdatedTimeRange; } - /** - * @return int - */ public function getWorkflowStepId(): int { return $this->workflowStepId; @@ -552,17 +486,11 @@ public function setBuyUrl(?string $buyUrl): void $this->buyUrl = $buyUrl; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; @@ -582,25 +510,16 @@ public function setVendor(?string $vendor): void $this->vendor = $vendor; } - /** - * @return int - */ public function getFilesCount(): int { return $this->filesCount; } - /** - * @return array - */ public function getFileIds(): array { return $this->fileIds; } - /** - * @param array $fileIds - */ public function setFileIds(array $fileIds): void { $this->fileIds = $fileIds; @@ -623,17 +542,11 @@ public function setIsArchived(bool $isArchived): void $this->isArchived = $isArchived; } - /** - * @return array - */ public function getFields(): array { return $this->fields; } - /** - * @param array $fields - */ public function setFields(array $fields): void { $this->fields = $fields; diff --git a/src/CrowdinApiClient/Model/TaskComment.php b/src/CrowdinApiClient/Model/TaskComment.php index 44d6d6e7..dabfb76b 100644 --- a/src/CrowdinApiClient/Model/TaskComment.php +++ b/src/CrowdinApiClient/Model/TaskComment.php @@ -55,73 +55,46 @@ public function __construct(array $data = []) $this->updatedAt = (string)$this->getDataProperty('updatedAt'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return int - */ public function getUserId(): int { return $this->userId; } - /** - * @return int - */ public function getTaskId(): int { return $this->taskId; } - /** - * @return string - */ public function getText(): string { return $this->text; } - /** - * @param string $text - */ public function setText(string $text): void { $this->text = $text; } - /** - * @return int|null - */ public function getTimeSpent(): ?int { return $this->timeSpent; } - /** - * @param int|null $timeSpent - */ public function setTimeSpent(?int $timeSpent): void { $this->timeSpent = $timeSpent; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; diff --git a/src/CrowdinApiClient/Model/TaskForUpdate.php b/src/CrowdinApiClient/Model/TaskForUpdate.php index b908cd41..20f3babc 100644 --- a/src/CrowdinApiClient/Model/TaskForUpdate.php +++ b/src/CrowdinApiClient/Model/TaskForUpdate.php @@ -122,81 +122,51 @@ public function setSplitFiles(bool $splitFiles): void $this->splitFiles = $splitFiles; } - /** - * @return bool - */ public function getSplitContent(): bool { return $this->splitContent; } - /** - * @param bool $splitContent - */ public function setSplitContent(bool $splitContent): void { $this->splitContent = $splitContent; } - /** - * @return array - */ public function getStringIds(): array { return $this->stringIds; } - /** - * @param array $stringIds - */ public function setStringIds(array $stringIds): void { $this->stringIds = $stringIds; } - /** - * @return bool - */ public function getSkipAssignedStrings(): bool { return $this->skipAssignedStrings; } - /** - * @param bool $skipAssignedStrings - */ public function setSkipAssignedStrings(bool $skipAssignedStrings): void { $this->skipAssignedStrings = $skipAssignedStrings; } - /** - * @return string|null - */ public function getDateFrom(): ?string { return $this->dateFrom; } - /** - * @param string $dateFrom - */ public function setDateFrom(string $dateFrom): void { $this->dateFrom = $dateFrom; } - /** - * @return string|null - */ public function getDateTo(): ?string { return $this->dateTo; } - /** - * @param string $dateTo - */ public function setDateTo(string $dateTo): void { $this->dateTo = $dateTo; diff --git a/src/CrowdinApiClient/Model/TaskSettingsTemplate.php b/src/CrowdinApiClient/Model/TaskSettingsTemplate.php index 92cf58a5..7c2770f8 100644 --- a/src/CrowdinApiClient/Model/TaskSettingsTemplate.php +++ b/src/CrowdinApiClient/Model/TaskSettingsTemplate.php @@ -39,57 +39,36 @@ public function __construct(array $data = []) $this->updatedAt = (string)$this->getDataProperty('updatedAt'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return string - */ public function getName(): string { return $this->name; } - /** - * @param string $name - */ public function setName(string $name): void { $this->name = $name; } - /** - * @return array - */ public function getConfig(): array { return $this->config; } - /** - * @param array $config - */ public function setConfig(array $config): void { $this->config = $config; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; diff --git a/src/CrowdinApiClient/Model/Term.php b/src/CrowdinApiClient/Model/Term.php index 269cacba..aad04707 100644 --- a/src/CrowdinApiClient/Model/Term.php +++ b/src/CrowdinApiClient/Model/Term.php @@ -92,9 +92,6 @@ class Term extends BaseModel */ protected $fields; - /** - * @param array $data - */ public function __construct(array $data = []) { parent::__construct($data); @@ -118,81 +115,51 @@ public function __construct(array $data = []) $this->fields = $this->nullableArray('fields'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return int - */ public function getUserId(): int { return $this->userId; } - /** - * @return int - */ public function getGlossaryId(): int { return $this->glossaryId; } - /** - * @return string - */ public function getLanguageId(): string { return $this->languageId; } - /** - * @return string - */ public function getText(): string { return $this->text; } - /** - * @param string $text - */ public function setText(string $text): void { $this->text = $text; } - /** - * @return string - */ public function getDescription(): string { return $this->description; } - /** - * @param string $description - */ public function setDescription(string $description): void { $this->description = $description; } - /** - * @return string - */ public function getPartOfSpeech(): string { return $this->partOfSpeech; } - /** - * @param string $partOfSpeech - */ public function setPartOfSpeech(string $partOfSpeech): void { $this->partOfSpeech = $partOfSpeech; @@ -253,25 +220,16 @@ public function getConceptId(): int return $this->conceptId; } - /** - * @return string - */ public function getLemma(): string { return $this->lemma; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; diff --git a/src/CrowdinApiClient/Model/TranslationMemory.php b/src/CrowdinApiClient/Model/TranslationMemory.php index 69b40220..74ed7d9b 100644 --- a/src/CrowdinApiClient/Model/TranslationMemory.php +++ b/src/CrowdinApiClient/Model/TranslationMemory.php @@ -67,9 +67,6 @@ class TranslationMemory extends BaseModel */ protected $webUrl; - /** - * @param array $data - */ public function __construct(array $data = []) { parent::__construct($data); @@ -88,81 +85,51 @@ public function __construct(array $data = []) $this->webUrl = (string)$this->getDataProperty('webUrl'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return int - */ public function getGroupId(): int { return $this->groupId; } - /** - * @return string - */ public function getName(): string { return $this->name; } - /** - * @param string $name - */ public function setName(string $name): void { $this->name = $name; } - /** - * @return array - */ public function getLanguageIds(): array { return $this->languageIds; } - /** - * @return int - */ public function getSegmentsCount(): int { return $this->segmentsCount; } - /** - * @return array - */ public function getDefaultProjectIds(): array { return $this->defaultProjectIds; } - /** - * @return array - */ public function getProjectIds(): array { return $this->projectIds; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @param string $createdAt - */ public function setCreatedAt(string $createdAt): void { $this->createdAt = $createdAt; diff --git a/src/CrowdinApiClient/Model/TranslationMemoryConcordance.php b/src/CrowdinApiClient/Model/TranslationMemoryConcordance.php index e79d08db..f47506ad 100644 --- a/src/CrowdinApiClient/Model/TranslationMemoryConcordance.php +++ b/src/CrowdinApiClient/Model/TranslationMemoryConcordance.php @@ -82,17 +82,11 @@ public function getRelevant(): int return $this->relevant; } - /** - * @return string|null - */ public function getSubstituted(): ?string { return $this->substituted; } - /** - * @return string|null - */ public function getUpdatedAt(): ?string { return $this->updatedAt; diff --git a/src/CrowdinApiClient/Model/TranslationMemoryExport.php b/src/CrowdinApiClient/Model/TranslationMemoryExport.php index b1d39497..733b2f88 100644 --- a/src/CrowdinApiClient/Model/TranslationMemoryExport.php +++ b/src/CrowdinApiClient/Model/TranslationMemoryExport.php @@ -60,129 +60,81 @@ public function __construct(array $data = []) $this->finishedAt = (string)$this->getDataProperty('finishedAt'); } - /** - * @return string - */ public function getIdentifier(): string { return $this->identifier; } - /** - * @param string $identifier - */ public function setIdentifier(string $identifier): void { $this->identifier = $identifier; } - /** - * @return string - */ public function getStatus(): string { return $this->status; } - /** - * @param string $status - */ public function setStatus(string $status): void { $this->status = $status; } - /** - * @return int - */ public function getProgress(): int { return $this->progress; } - /** - * @param int $progress - */ public function setProgress(int $progress): void { $this->progress = $progress; } - /** - * @return array - */ public function getAttributes(): array { return $this->attributes; } - /** - * @param array $attributes - */ public function setAttributes(array $attributes): void { $this->attributes = $attributes; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @param string $createdAt - */ public function setCreatedAt(string $createdAt): void { $this->createdAt = $createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; } - /** - * @param string $updatedAt - */ public function setUpdatedAt(string $updatedAt): void { $this->updatedAt = $updatedAt; } - /** - * @return string - */ public function getStartedAt(): string { return $this->startedAt; } - /** - * @param string $startedAt - */ public function setStartedAt(string $startedAt): void { $this->startedAt = $startedAt; } - /** - * @return string - */ public function getFinishedAt(): string { return $this->finishedAt; } - /** - * @param string $finishedAt - */ public function setFinishedAt(string $finishedAt): void { $this->finishedAt = $finishedAt; diff --git a/src/CrowdinApiClient/Model/TranslationMemoryImport.php b/src/CrowdinApiClient/Model/TranslationMemoryImport.php index fed33c8b..24aae3c0 100644 --- a/src/CrowdinApiClient/Model/TranslationMemoryImport.php +++ b/src/CrowdinApiClient/Model/TranslationMemoryImport.php @@ -60,129 +60,81 @@ public function __construct(array $data = []) $this->finishedAt = (string)$this->getDataProperty('finishedAt'); } - /** - * @return string - */ public function getIdentifier(): string { return $this->identifier; } - /** - * @param string $identifier - */ public function setIdentifier(string $identifier): void { $this->identifier = $identifier; } - /** - * @return string - */ public function getStatus(): string { return $this->status; } - /** - * @param string $status - */ public function setStatus(string $status): void { $this->status = $status; } - /** - * @return int - */ public function getProgress(): int { return $this->progress; } - /** - * @param int $progress - */ public function setProgress(int $progress): void { $this->progress = $progress; } - /** - * @return array - */ public function getAttributes(): array { return $this->attributes; } - /** - * @param array $attributes - */ public function setAttributes(array $attributes): void { $this->attributes = $attributes; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @param string $createdAt - */ public function setCreatedAt(string $createdAt): void { $this->createdAt = $createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; } - /** - * @param string $updatedAt - */ public function setUpdatedAt(string $updatedAt): void { $this->updatedAt = $updatedAt; } - /** - * @return string - */ public function getStartedAt(): string { return $this->startedAt; } - /** - * @param string $startedAt - */ public function setStartedAt(string $startedAt): void { $this->startedAt = $startedAt; } - /** - * @return string - */ public function getFinishedAt(): string { return $this->finishedAt; } - /** - * @param string $finishedAt - */ public function setFinishedAt(string $finishedAt): void { $this->finishedAt = $finishedAt; diff --git a/src/CrowdinApiClient/Model/TranslationMemorySegment.php b/src/CrowdinApiClient/Model/TranslationMemorySegment.php index c9fd51d7..2af71adf 100644 --- a/src/CrowdinApiClient/Model/TranslationMemorySegment.php +++ b/src/CrowdinApiClient/Model/TranslationMemorySegment.php @@ -27,17 +27,11 @@ public function __construct(array $data = []) }, (array)$this->getDataProperty('records')); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @param int $id - */ public function setId(int $id): void { $this->id = $id; diff --git a/src/CrowdinApiClient/Model/TranslationMemorySegmentRecord.php b/src/CrowdinApiClient/Model/TranslationMemorySegmentRecord.php index 9a8db770..421b5386 100644 --- a/src/CrowdinApiClient/Model/TranslationMemorySegmentRecord.php +++ b/src/CrowdinApiClient/Model/TranslationMemorySegmentRecord.php @@ -60,129 +60,81 @@ public function __construct(array $data = []) $this->updatedAt = $this->nullableString('updatedAt'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @param int $id - */ public function setId(int $id): void { $this->id = $id; } - /** - * @return string - */ public function getLanguageId(): string { return $this->languageId; } - /** - * @param string $languageId - */ public function setLanguageId(string $languageId): void { $this->languageId = $languageId; } - /** - * @return string - */ public function getText(): string { return $this->text; } - /** - * @param string $text - */ public function setText(string $text): void { $this->text = $text; } - /** - * @return int - */ public function getUsageCount(): int { return $this->usageCount; } - /** - * @param int $usageCount - */ public function setUsageCount(int $usageCount): void { $this->usageCount = $usageCount; } - /** - * @return int - */ public function getCreatedBy(): int { return $this->createdBy; } - /** - * @param int $createdBy - */ public function setCreatedBy(int $createdBy): void { $this->createdBy = $createdBy; } - /** - * @return int - */ public function getUpdatedBy(): int { return $this->updatedBy; } - /** - * @param int $updatedBy - */ public function setUpdatedBy(int $updatedBy): void { $this->updatedBy = $updatedBy; } - /** - * @return string|null - */ public function getCreatedAt(): ?string { return $this->createdAt; } - /** - * @param string|null $createdAt - */ public function setCreatedAt(?string $createdAt): void { $this->createdAt = $createdAt; } - /** - * @return string|null - */ public function getUpdatedAt(): ?string { return $this->updatedAt; } - /** - * @param string|null $updatedAt - */ public function setUpdatedAt(?string $updatedAt): void { $this->updatedAt = $updatedAt; diff --git a/src/CrowdinApiClient/Model/TranslationProjectDirectory.php b/src/CrowdinApiClient/Model/TranslationProjectDirectory.php index 8d229ad3..3599df91 100644 --- a/src/CrowdinApiClient/Model/TranslationProjectDirectory.php +++ b/src/CrowdinApiClient/Model/TranslationProjectDirectory.php @@ -52,113 +52,71 @@ public function __construct(array $data = []) $this->finishedAt = (string)$this->getDataProperty('finishedAt'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @param int $id - */ public function setId(int $id): void { $this->id = $id; } - /** - * @return int - */ public function getProjectId(): int { return $this->projectId; } - /** - * @param int $projectId - */ public function setProjectId(int $projectId): void { $this->projectId = $projectId; } - /** - * @return string - */ public function getStatus(): string { return $this->status; } - /** - * @param string $status - */ public function setStatus(string $status): void { $this->status = $status; } - /** - * @return int - */ public function getProgress(): int { return $this->progress; } - /** - * @param int $progress - */ public function setProgress(int $progress): void { $this->progress = $progress; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @param string $createdAt - */ public function setCreatedAt(string $createdAt): void { $this->createdAt = $createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; } - /** - * @param string $updatedAt - */ public function setUpdatedAt(string $updatedAt): void { $this->updatedAt = $updatedAt; } - /** - * @return string - */ public function getFinishedAt(): string { return $this->finishedAt; } - /** - * @param string $finishedAt - */ public function setFinishedAt(string $finishedAt): void { $this->finishedAt = $finishedAt; diff --git a/src/CrowdinApiClient/Model/User.php b/src/CrowdinApiClient/Model/User.php index 0ea0c45b..6c3fe6ee 100644 --- a/src/CrowdinApiClient/Model/User.php +++ b/src/CrowdinApiClient/Model/User.php @@ -73,17 +73,11 @@ public function __construct(array $data = []) $this->timezone = (string)$this->getDataProperty('timezone'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return string - */ public function getUsername(): string { return $this->username; @@ -94,25 +88,16 @@ public function setUsername(string $username): void $this->username = $username; } - /** - * @return string - */ public function getEmail(): string { return $this->email; } - /** - * @return bool - */ public function getEmailVerified(): bool { return $this->emailVerified; } - /** - * @return string - */ public function getFullName(): string { return $this->fullName; @@ -123,41 +108,26 @@ public function setFullName(string $fullName): void $this->fullName = $fullName; } - /** - * @return string - */ public function getAvatarUrl(): string { return $this->avatarUrl; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getLastSeen(): string { return $this->lastSeen; } - /** - * @return string - */ public function getTwoFactor(): string { return $this->twoFactor; } - /** - * @return string - */ public function getTimezone(): string { return $this->timezone; diff --git a/src/CrowdinApiClient/Model/Vote.php b/src/CrowdinApiClient/Model/Vote.php index 8817ff63..8c0b73b0 100644 --- a/src/CrowdinApiClient/Model/Vote.php +++ b/src/CrowdinApiClient/Model/Vote.php @@ -32,9 +32,6 @@ class Vote extends BaseModel */ protected $mark; - /** - * @param array $data - */ public function __construct(array $data = []) { parent::__construct($data); @@ -46,81 +43,51 @@ public function __construct(array $data = []) $this->mark = $this->getDataProperty('mark'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @param int $id - */ public function setId(int $id): void { $this->id = $id; } - /** - * @return array - */ public function getUser(): array { return $this->user; } - /** - * @param array $user - */ public function setUser(array $user): void { $this->user = $user; } - /** - * @return int - */ public function getTranslationId(): int { return $this->translationId; } - /** - * @param int $translationId - */ public function setTranslationId(int $translationId): void { $this->translationId = $translationId; } - /** - * @return string - */ public function getVotedAt(): string { return $this->votedAt; } - /** - * @param string $votedAt - */ public function setVotedAt(string $votedAt): void { $this->votedAt = $votedAt; } - /** - * @return string - */ public function getMark(): string { return $this->mark; } - /** - * @param string $mark - */ public function setMark(string $mark): void { $this->mark = $mark; diff --git a/src/CrowdinApiClient/Model/Webhook.php b/src/CrowdinApiClient/Model/Webhook.php index 13bc8abf..4a739235 100644 --- a/src/CrowdinApiClient/Model/Webhook.php +++ b/src/CrowdinApiClient/Model/Webhook.php @@ -72,9 +72,6 @@ class Webhook extends BaseModel */ protected $updatedAt; - /** - * @param array $data - */ public function __construct(array $data = []) { parent::__construct($data); @@ -94,177 +91,111 @@ public function __construct(array $data = []) $this->updatedAt = (string)$this->getDataProperty('updatedAt'); } - /** - * @return int - */ public function getId(): int { return $this->id; } - /** - * @return int - */ public function getProjectId(): int { return $this->projectId; } - /** - * @return string - */ public function getName(): string { return $this->name; } - /** - * @param string $name - */ public function setName(string $name): void { $this->name = $name; } - /** - * @return string - */ public function getUrl(): string { return $this->url; } - /** - * @param string $url - */ public function setUrl(string $url): void { $this->url = $url; } - /** - * @return array - */ public function getEvents(): array { return $this->events; } - /** - * @param array $events - */ public function setEvents(array $events): void { $this->events = $events; } - /** - * @return array - */ public function getHeaders(): array { return $this->headers; } - /** - * @param array $headers - */ public function setHeaders(array $headers): void { $this->headers = $headers; } - /** - * @return array - */ public function getPayload(): array { return $this->payload; } - /** - * @param array $payload - */ public function setPayload(array $payload): void { $this->payload = $payload; } - /** - * @return bool - */ public function isActive(): bool { return $this->isActive; } - /** - * @param bool $isActive - */ public function setIsActive(bool $isActive): void { $this->isActive = $isActive; } - /** - * @return bool - */ public function isBatchingEnabled(): bool { return $this->batchingEnabled; } - /** - * @param bool $batchingEnabled - */ public function setBatchingEnabled(bool $batchingEnabled): void { $this->batchingEnabled = $batchingEnabled; } - /** - * @return string - */ public function getRequestType(): string { return $this->requestType; } - /** - * @param string $requestType - */ public function setRequestType(string $requestType): void { $this->requestType = $requestType; } - /** - * @return string - */ public function getContentType(): string { return $this->contentType; } - /** - * @param string $contentType - */ public function setContentType(string $contentType): void { $this->contentType = $contentType; } - /** - * @return string - */ public function getCreatedAt(): string { return $this->createdAt; } - /** - * @return string - */ public function getUpdatedAt(): string { return $this->updatedAt; diff --git a/src/CrowdinApiClient/Model/WordAlignment.php b/src/CrowdinApiClient/Model/WordAlignment.php index 396198dc..45503bd1 100644 --- a/src/CrowdinApiClient/Model/WordAlignment.php +++ b/src/CrowdinApiClient/Model/WordAlignment.php @@ -32,9 +32,6 @@ static function (array $alignment): Alignment { ); } - /** - * @return string - */ public function getText(): string { return $this->text;