Skip to content

Commit

Permalink
- Added Language property to Progress model [issue #65]
Browse files Browse the repository at this point in the history
  • Loading branch information
bhdnb committed Jan 15, 2025
1 parent d2e4f80 commit 2fa1adb
Show file tree
Hide file tree
Showing 4 changed files with 332 additions and 231 deletions.
11 changes: 11 additions & 0 deletions src/CrowdinApiClient/Model/Progress.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
*/
class Progress extends BaseModel
{
/**
* @var Language $language
*/
protected $language;

/**
* @var string
*/
Expand Down Expand Up @@ -39,13 +44,19 @@ public function __construct(array $data = [])
{
parent::__construct($data);

$this->language = new Language($this->getDataProperty('language'));
$this->languageId = (string)$this->getDataProperty('languageId');
$this->words = (array)$this->getDataProperty('words');
$this->phrases = (array)$this->getDataProperty('phrases');
$this->translationProgress = (integer)$this->getDataProperty('translationProgress');
$this->approvalProgress = (integer)$this->getDataProperty('approvalProgress');
}

public function getLanguage(): Language
{
return $this->language;
}

/**
* @return string
*/
Expand Down
Loading

0 comments on commit 2fa1adb

Please sign in to comment.