Skip to content

Commit

Permalink
Adding "result_culture" (#21)
Browse files Browse the repository at this point in the history
* Adding "result_culture"

* mino
  • Loading branch information
Nyholm authored Jun 17, 2020
1 parent 3f9b70e commit 342076a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"require-dev": {
"phpunit/phpunit": "^7.0",
"php-http/message-factory": "^1.0",
"php-http/curl-client": "^1.6",
"php-http/curl-client": "^2.0",
"php-http/message": "^1.0",
"nyholm/psr7": "^1.1",
"nyholm/nsa": "^1.0"
Expand Down
7 changes: 7 additions & 0 deletions src/Model/Match/CandidateMatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ final class CandidateMatch implements CreatableFromArray
private $confidence;
private $grade;
private $dimensionScore;
private $resultCulture;
private $text;

private function __construct()
Expand All @@ -27,6 +28,7 @@ public static function createFromArray(array $data)
$model->match = $data['attributes']['match'];
$model->confidence = $data['attributes']['confidence'] ?? null;
$model->grade = $data['attributes']['grade'] ?? null;
$model->resultCulture = $data['attributes']['result_culture'] ?? null;
$model->dimensionScore = $data['attributes']['dimension_score'] ?? [];
$model->text = $data['attributes']['text'] ?? [];

Expand Down Expand Up @@ -62,4 +64,9 @@ public function getText(): array
{
return $this->text;
}

public function getResultCulture(): ?int
{
return $this->resultCulture;
}
}

0 comments on commit 342076a

Please sign in to comment.